第一个C程序
# include<stdio.h>
int main(){
printf("Hello World");
return 0;
}
编译生成.exe
文件 : $ gcc -o HelloWorld .\HelloWorld.c
参数-o
指定生成文件的文件名.
执行$ ./HelloWorld
Hello World
仅执行编译操作,不进行连接操作: $ gcc -c .\HelloWorld.c
生成.o
文件
执行编译预处理: $ gcc -E .\HelloWorld.c
PS D:\C\C--fishccom> gcc -E .\HelloWorld.c
# 1 ".\\HelloWorld.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 ".\\HelloWorld.c"
# 1 "d:\\program\\ccccc\\include\\stdio.h" 1 3
# 38 "d:\\program\\ccccc\\include\\stdio.h" 3
# 39 "d:\\program\\ccccc\\include\\stdio.h" 3
# 55 "d:\\program\\ccccc\\include\\stdio.h" 3
# 1 "d:\\program\\ccccc\\include\\_mingw.h" 1 3
# 55 "d:\\program\\ccccc\\include\\_mingw.h" 3
# 56 "d:\\program\\ccccc\\include\\_mingw.h" 3
# 66 "d:\\program\\ccccc\\include\\_mingw.h" 3
# 1 "d:\\program\\ccccc\\include\\msvcrtver.h" 1 3
# 35 "d:\\program\\ccccc\\include\\msvcrtver.h" 3
# 36 "d:\\program\\ccccc\\include\\msvcrtver.h" 3
# 67 "d:\\program\\ccccc\\include\\_mingw.h" 2 3
# 1 "d:\\program\\ccccc\\include\\w32api.h" 1 3
# 35 "d:\\program\\ccccc\\include\\w32api.h" 3
# 36 "d:\\program\\ccccc\\include\\w32api.h" 3
# 59 "d:\\program\\ccccc\\include\\w32api.h" 3
# 1 "d:\\program\\ccccc\\include\\sdkddkver.h" 1 3
# 35 "d:\\program\\ccccc\\include\\sdkddkver.h" 3
# 36 "d:\\program\\ccccc\\include\\sdkddkver.h" 3
# 60 "d:\\program\\ccccc\\include\\w32api.h" 2 3
# 74 "d:\\program\\ccccc\\include\\_mingw.h" 2 3
# 174 "d:\\program\\ccccc\\include\\_mingw.h" 3
# 1 "d:\\program\\ccccc\\include\\features.h" 1 3
# 39 "d:\\program\\ccccc\\include\\features.h" 3
# 40 "d:\\program\\ccccc\\include\\features.h" 3
# 175 "d:\\program\\ccccc\\include\\_mingw.h" 2 3
# 56 "d:\\program\\ccccc\\include\\stdio.h" 2 3
# 68 "d:\\program\\ccccc\\include\\stdio.h" 3
# 1 "d:\\program\\ccccc\\lib\\gcc\\mingw32\\9.2.0\\include\\stddef.h" 1 3 4
# 209 "d:\\program\\ccccc\\lib\\gcc\\mingw32\\9.2.0\\include\\stddef.h" 3 4
# 209 "d:\\program\\ccccc\\lib\\gcc\\mingw32\\9.2.0\\include\\stddef.h" 3 4
typedef unsigned int size_t;
# 321 "d:\\program\\ccccc\\lib\\gcc\\mingw32\\9.2.0\\include\\stddef.h" 3 4
typedef short unsigned int wchar_t;
# 350 "d:\\program\\ccccc\\lib\\gcc\\mingw32\\9.2.0\\include\\stddef.h" 3 4
typedef short unsigned int wint_t;
# 69 "d:\\program\\ccccc\\include\\stdio.h" 2 3
# 95 "d:\\program\\ccccc\\include\\stdio.h" 3
# 1 "d:\\program\\ccccc\\include\\sys/types.h" 1 3
# 34 "d:\\program\\ccccc\\include\\sys/types.h" 3
# 35 "d:\\program\\ccccc\\include\\sys/types.h" 3
# 62 "d:\\program\\ccccc\\include\\sys/types.h" 3
typedef long __off32_t;
typedef __off32_t _off_t;
typedef _off_t off_t;
# 91 "d:\\program\\ccccc\\include\\sys/types.h" 3
typedef long long __off64_t;
typedef __off64_t off64_t;
# 115 "d:\\program\\ccccc\\include\\sys/types.h" 3
typedef int _ssize_t;
typedef _ssize_t ssize_t;
# 96 "d:\\program\\ccccc\\include\\stdio.h" 2 3
# 1 "d:\\program\\ccccc\\lib\\gcc\\mingw32\\9.2.0\\include\\stdarg.h" 1 3 4
# 40 "d:\\program\\ccccc\\lib\\gcc\\mingw32\\9.2.0\\include\\stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 103 "d:\\program\\ccccc\\include\\stdio.h" 2 3
# 210 "d:\\program\\ccccc\\include\\stdio.h" 3
typedef struct _iobuf
{
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
} FILE;
# 239 "d:\\program\\ccccc\\include\\stdio.h" 3
extern __attribute__((__dllimport__)) FILE _iob[];
# 252 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * fopen (const char *, const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * freopen (const char *, const char *, FILE
*);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fflush (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fclose (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int remove (const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int rename (const char *, const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * tmpfile (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) char * tmpnam (char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) char *_tempnam (const char *, const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _rmtmp (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _unlink (const char *);
# 289 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) char * tempnam (const char *, const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int rmtmp (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int unlink (const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int setvbuf (FILE *, char *, int, size_t);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) void setbuf (FILE *, char *);
# 342 "d:\\program\\ccccc\\include\\stdio.h" 3
extern int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,2,3))) __mingw_fprintf(FILE*, const char*, ...);
extern int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,1,2))) __mingw_printf(const char*, ...);
extern int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,2,3))) __mingw_sprintf(char*, const char*, ...);
extern int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,3,4))) __mingw_snprintf(char*, size_t, const char*, ...);
extern int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,2,0))) __mingw_vfprintf(FILE*, const char*, __builtin_va_list);
extern int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,1,0))) __mingw_vprintf(const char*, __builtin_va_list);
extern int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,2,0))) __mingw_vsprintf(char*, const char*, __builtin_va_list);
extern int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,3,0))) __mingw_vsnprintf(char*, size_t, const char*, __builtin_va_list);
# 376 "d:\\program\\ccccc\\include\\stdio.h" 3
extern unsigned int _mingw_output_format_control( unsigned int, unsigned int );
# 461 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fprintf (FILE *, const char *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int printf (const char *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int sprintf (char *, const char *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int vfprintf (FILE *, const char *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int vprintf (const char *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int vsprintf (char *, const char *, __builtin_va_list);
# 479 "d:\\program\\ccccc\\include\\stdio.h" 3
static __inline__ __attribute__((__cdecl__)) __attribute__((__nothrow__))
int snprintf (char *__buf, size_t __len, const char *__format, ...)
{
register int __retval;
__builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
__retval = __mingw_vsnprintf( __buf, __len, __format, __local_argv );
__builtin_va_end( __local_argv );
return __retval;
}
static __inline__ __attribute__((__cdecl__)) __attribute__((__nothrow__))
int vsnprintf (char *__buf, size_t __len, const char *__format, __builtin_va_list __local_argv)
{
return __mingw_vsnprintf( __buf, __len, __format, __local_argv );
}
# 513 "d:\\program\\ccccc\\include\\stdio.h" 3
int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__ms_printf__,2,3))) __msvcrt_fprintf(FILE *, const char *, ...);
int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__ms_printf__,1,2))) __msvcrt_printf(const char *, ...);
int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__ms_printf__,2,3))) __msvcrt_sprintf(char *, const char *, ...);
int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__ms_printf__,2,0))) __msvcrt_vfprintf(FILE *, const char *, __builtin_va_list);
int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__ms_printf__,1,0))) __msvcrt_vprintf(const char *, __builtin_va_list);
int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__ms_printf__,2,0))) __msvcrt_vsprintf(char *, const char *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _snprintf (char *, size_t, const char *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _vsnprintf (char *, size_t, const char *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _vscprintf (const char *, __builtin_va_list);# 536 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,3,4)))
int snprintf (char *, size_t, const char *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) __attribute__((__format__(__mingw_printf__,3,0)))
int vsnprintf (char *, size_t, const char *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__))
int vscanf (const char * __restrict__, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__))
int vfscanf (FILE * __restrict__, const char * __restrict__, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__))
int vsscanf (const char * __restrict__, const char * __restrict__, __builtin_va_list);
# 679 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) ssize_t
getdelim (char ** __restrict__, size_t * __restrict__, int, FILE * __restrict__);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) ssize_t
getline (char ** __restrict__, size_t * __restrict__, FILE * __restrict__);
# 699 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fscanf (FILE *, const char *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int scanf (const char *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int sscanf (const char *, const char *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fgetc (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) char * fgets (char *, int, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fputc (int, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fputs (const char *, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) char * gets (char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int puts (const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int ungetc (int, FILE *);
# 720 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _filbuf (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _flsbuf (int, FILE *);
extern inline __attribute__((__gnu_inline__)) __attribute__((__cdecl__)) __attribute__((__nothrow__)) int
getc (FILE *);
extern inline __attribute__((__gnu_inline__)) __attribute__((__cdecl__)) __attribute__((__nothrow__)) int
getc (FILE * __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) *__F->_ptr++
: _filbuf (__F);
}
extern inline __attribute__((__gnu_inline__)) __attribute__((__cdecl__)) __attribute__((__nothrow__)) int
putc (int, FILE *);
extern inline __attribute__((__gnu_inline__)) __attribute__((__cdecl__)) __attribute__((__nothrow__)) int
putc (int __c, FILE * __F)
{
return (--__F->_cnt >= 0)
? (int) (unsigned char) (*__F->_ptr++ = (char)__c)
: _flsbuf (__c, __F);
}
extern inline __attribute__((__gnu_inline__)) __attribute__((__cdecl__)) __attribute__((__nothrow__)) int
getchar (void);
extern inline __attribute__((__gnu_inline__)) __attribute__((__cdecl__)) __attribute__((__nothrow__)) int
getchar (void)
{
return (--(&_iob[0])->_cnt >= 0)
? (int) (unsigned char) *(&_iob[0])->_ptr++
: _filbuf ((&_iob[0]));
}
extern inline __attribute__((__gnu_inline__)) __attribute__((__cdecl__)) __attribute__((__nothrow__)) int
putchar(int);
extern inline __attribute__((__gnu_inline__)) __attribute__((__cdecl__)) __attribute__((__nothrow__)) int
putchar(int __c)
{
return (--(&_iob[1])->_cnt >= 0)
? (int) (unsigned char) (*(&_iob[1])->_ptr++ = (char)__c)
: _flsbuf (__c, (&_iob[1]));}
# 767 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) size_t fread (void *, size_t, size_t, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) size_t fwrite (const void *, size_t, size_t, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fseek (FILE *, long, int);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) long ftell (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) void rewind (FILE *);
# 821 "d:\\program\\ccccc\\include\\stdio.h" 3
typedef union { long long __value; __off64_t __offset; } fpos_t;
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fgetpos (FILE *, fpos_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fsetpos (FILE *, const fpos_t *);
# 862 "d:\\program\\ccccc\\include\\stdio.h" 3
int __attribute__((__cdecl__)) __attribute__((__nothrow__)) __mingw_fseeki64 (FILE *, long long, int);
extern inline __attribute__((__gnu_inline__)) __attribute__((__always_inline__)) __attribute__((__cdecl__)) __attribute__((__nothrow__)) int _fseeki64 (FILE *__f, long long __o, int __w)
{ return __mingw_fseeki64 (__f, __o, __w); }
long long __attribute__((__cdecl__)) __attribute__((__nothrow__)) __mingw_ftelli64 (FILE *);
extern inline __attribute__((__gnu_inline__)) __attribute__((__always_inline__)) __attribute__((__cdecl__)) long long __attribute__((__nothrow__)) _ftelli64 (FILE *__file )
{ return __mingw_ftelli64 (__file); }
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int feof (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int ferror (FILE *);
# 886 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) void clearerr (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) void perror (const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * _popen (const char *, const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _pclose (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * popen (const char *, const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int pclose (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _flushall (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _fgetchar (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _fputchar (int);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * _fdopen (int, const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _fileno (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _fcloseall (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * _fsopen (const char *, const char *, int);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _getmaxstdio (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _setmaxstdio (int);
# 936 "d:\\program\\ccccc\\include\\stdio.h" 3
unsigned int __attribute__((__cdecl__)) __mingw_get_output_format (void);
unsigned int __attribute__((__cdecl__)) __mingw_set_output_format (unsigned int);
int __attribute__((__cdecl__)) __mingw_get_printf_count_output (void);
int __attribute__((__cdecl__)) __mingw_set_printf_count_output (int);
# 962 "d:\\program\\ccccc\\include\\stdio.h" 3
extern inline __attribute__((__gnu_inline__)) __attribute__((__always_inline__)) unsigned int __attribute__((__cdecl__)) _get_output_format (void)
{ return __mingw_get_output_format (); }
extern inline __attribute__((__gnu_inline__)) __attribute__((__always_inline__)) unsigned int __attribute__((__cdecl__)) _set_output_format (unsigned int __style)
{ return __mingw_set_output_format (__style); }
# 987 "d:\\program\\ccccc\\include\\stdio.h" 3
extern inline __attribute__((__gnu_inline__)) __attribute__((__always_inline__)) int __attribute__((__cdecl__)) _get_printf_count_output (void)
{ return 0 ? 1 : __mingw_get_printf_count_output (); }
extern inline __attribute__((__gnu_inline__)) __attribute__((__always_inline__)) int __attribute__((__cdecl__)) _set_printf_count_output (int __mode)
{ return 0 ? 1 : __mingw_set_printf_count_output (__mode); }
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fgetchar (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fputchar (int);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * fdopen (int, const char *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fileno (FILE *);
# 1007 "d:\\program\\ccccc\\include\\stdio.h" 3
extern inline __attribute__((__gnu_inline__)) __attribute__((__always_inline__)) FILE * __attribute__((__cdecl__)) __attribute__((__nothrow__)) fopen64 (const char *, const char *);
extern inline __attribute__((__gnu_inline__)) __attribute__((__always_inline__))
FILE * __attribute__((__cdecl__)) __attribute__((__nothrow__)) fopen64 (const char * filename, const char
* mode)
{ return fopen (filename, mode); }
int __attribute__((__cdecl__)) __attribute__((__nothrow__)) fseeko64 (FILE *, __off64_t, int);
# 1028 "d:\\program\\ccccc\\include\\stdio.h" 3
__off64_t __attribute__((__cdecl__)) __attribute__((__nothrow__)) ftello64 (FILE *);
# 1041 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fwprintf (FILE *, const wchar_t *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int wprintf (const wchar_t *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int vfwprintf (FILE *, const wchar_t *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int vwprintf (const wchar_t *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _snwprintf (wchar_t *, size_t, const wchar_t
*, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _vscwprintf (const wchar_t *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _vsnwprintf (wchar_t *, size_t, const wchar_t *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fwscanf (FILE *, const wchar_t *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int wscanf (const wchar_t *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int swscanf (const wchar_t *, const wchar_t *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t fgetwc (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t fputwc (wchar_t, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t ungetwc (wchar_t, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int swprintf (wchar_t *, const wchar_t *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int vswprintf (wchar_t *, const wchar_t *, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wchar_t * fgetws (wchar_t *, int, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int fputws (const wchar_t *, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t getwc (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t getwchar (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t putwc (wint_t, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t putwchar (wint_t);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wchar_t * _getws (wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _putws (const wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * _wfdopen(int, const wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * _wfopen (const wchar_t *, const wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * _wfreopen (const wchar_t *, const wchar_t
*, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * _wfsopen (const wchar_t *, const wchar_t*
, int);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wchar_t * _wtmpnam (wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wchar_t * _wtempnam (const wchar_t *, const wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _wrename (const wchar_t *, const wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _wremove (const wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) void _wperror (const wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * _wpopen (const wchar_t *, const wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int snwprintf (wchar_t *, size_t, const wchar_t *, ...);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int vsnwprintf (wchar_t *, size_t, const wchar_t *, __builtin_va_list);
# 1099 "d:\\program\\ccccc\\include\\stdio.h" 3
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int vwscanf (const wchar_t *__restrict__, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__))
int vfwscanf (FILE *__restrict__, const wchar_t *__restrict__, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__))
int vswscanf (const wchar_t *__restrict__, const wchar_t * __restrict__, __builtin_va_list);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) FILE * wpopen (const wchar_t *, const wchar_t *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t _fgetwchar (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t _fputwchar (wint_t);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _getw (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int _putw (int, FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t fgetwchar (void);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) wint_t fputwchar (wint_t);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int getw (FILE *);
__attribute__((__cdecl__)) __attribute__((__nothrow__)) int putw (int, FILE *);
# 2 ".\\HelloWorld.c" 2
# 3 ".\\HelloWorld.c"
int main(){
printf("Hello World");
return 0;
}
PS D:\C\C--fishccom>
$ gcc -S .\HelloWorld.c
编译为汇编代码. 生成.s
文件
.file "HelloWorld.c"
.text
.def ___main; .scl 2; .type 32; .endef
.section .rdata,"dr"
LC0:
.ascii "Hello World\0"
.text
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
LFB13:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
andl $-16, %esp
subl $16, %esp
call ___main
movl $LC0, (%esp)
call _printf
movl $0, %eax
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE13:
.ident "GCC: (MinGW.org GCC Build-2) 9.2.0"
.def _printf; .scl 2; .type 32; .endef