×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

rolia 比google强。google后面是网页rolia后面是在线专家!!Canadian Tire 和 瞎起哄两位大侠注意了!!我还有个问题。

本文发表在 rolia.net 枫下论坛怎样读 c 程序的预编译结果?? give me some clue.

e.g.

# 1 "t02.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "t02.c"

# 1 "/usr/include/stdio.h" 1 3 4
# 29 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/_ansi.h" 1 3 4
# 15 "/usr/include/_ansi.h" 3 4
# 1 "/usr/include/newlib.h" 1 3 4
# 16 "/usr/include/_ansi.h" 2 3 4
# 1 "/usr/include/sys/config.h" 1 3 4



# 1 "/usr/include/machine/ieeefp.h" 1 3 4
# 5 "/usr/include/sys/config.h" 2 3 4
# 151 "/usr/include/sys/config.h" 3 4
# 1 "/usr/include/cygwin/config.h" 1 3 4
# 152 "/usr/include/sys/config.h" 2 3 4
# 17 "/usr/include/_ansi.h" 2 3 4
# 30 "/usr/include/stdio.h" 2 3 4
.
.
.
.
省去n行。


ssize_t __attribute__((__cdecl__)) __getdelim (char **, size_t *, int, FILE *);
ssize_t __attribute__((__cdecl__)) __getline (char **, size_t *, FILE *);
# 334 "/usr/include/stdio.h" 3 4
int __attribute__((__cdecl__)) __srget (FILE *);
int __attribute__((__cdecl__)) __swbuf (int, FILE *);






FILE *__attribute__((__cdecl__)) funopen (const void * _cookie, int (*readfn)(void * _cookie, char *_buf, int _n), int (*writefn)(void * _cookie, const char *_buf, int _n), fpos_t (*seekfn)(void * _cookie, fpos_t _off, int _whence), int (*closefn)(void * _cookie));
# 359 "/usr/include/stdio.h" 3 4
static __inline__ int __sgetc(FILE *__p)
{
int __c = (--(__p)->_r < 0 ? __srget(__p) : (int)(*(__p)->_p++));
if ((__p->_flags & 0x4000) && (__c == '\r'))
{
int __c2 = (--(__p)->_r < 0 ? __srget(__p) : (int)(*(__p)->_p++));
if (__c2 == '\n')
__c = __c2;
else
ungetc(__c2, __p);
}
return __c;
}
# 441 "/usr/include/stdio.h" 3 4

# 3 "t02.c" 2

main()
{

int a;

a='a';
a=getc(((__getreent())->_stdin));
putc(a,((__getreent())->_stdout));

return;

}更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / rolia 比google强。google后面是网页rolia后面是在线专家!!Canadian Tire 和 瞎起哄两位大侠注意了!!我还有个问题。
    本文发表在 rolia.net 枫下论坛怎样读 c 程序的预编译结果?? give me some clue.

    e.g.

    # 1 "t02.c"
    # 1 "<built-in>"
    # 1 "<command line>"
    # 1 "t02.c"

    # 1 "/usr/include/stdio.h" 1 3 4
    # 29 "/usr/include/stdio.h" 3 4
    # 1 "/usr/include/_ansi.h" 1 3 4
    # 15 "/usr/include/_ansi.h" 3 4
    # 1 "/usr/include/newlib.h" 1 3 4
    # 16 "/usr/include/_ansi.h" 2 3 4
    # 1 "/usr/include/sys/config.h" 1 3 4



    # 1 "/usr/include/machine/ieeefp.h" 1 3 4
    # 5 "/usr/include/sys/config.h" 2 3 4
    # 151 "/usr/include/sys/config.h" 3 4
    # 1 "/usr/include/cygwin/config.h" 1 3 4
    # 152 "/usr/include/sys/config.h" 2 3 4
    # 17 "/usr/include/_ansi.h" 2 3 4
    # 30 "/usr/include/stdio.h" 2 3 4
    .
    .
    .
    .
    省去n行。


    ssize_t __attribute__((__cdecl__)) __getdelim (char **, size_t *, int, FILE *);
    ssize_t __attribute__((__cdecl__)) __getline (char **, size_t *, FILE *);
    # 334 "/usr/include/stdio.h" 3 4
    int __attribute__((__cdecl__)) __srget (FILE *);
    int __attribute__((__cdecl__)) __swbuf (int, FILE *);






    FILE *__attribute__((__cdecl__)) funopen (const void * _cookie, int (*readfn)(void * _cookie, char *_buf, int _n), int (*writefn)(void * _cookie, const char *_buf, int _n), fpos_t (*seekfn)(void * _cookie, fpos_t _off, int _whence), int (*closefn)(void * _cookie));
    # 359 "/usr/include/stdio.h" 3 4
    static __inline__ int __sgetc(FILE *__p)
    {
    int __c = (--(__p)->_r < 0 ? __srget(__p) : (int)(*(__p)->_p++));
    if ((__p->_flags & 0x4000) && (__c == '\r'))
    {
    int __c2 = (--(__p)->_r < 0 ? __srget(__p) : (int)(*(__p)->_p++));
    if (__c2 == '\n')
    __c = __c2;
    else
    ungetc(__c2, __p);
    }
    return __c;
    }
    # 441 "/usr/include/stdio.h" 3 4

    # 3 "t02.c" 2

    main()
    {

    int a;

    a='a';
    a=getc(((__getreent())->_stdin));
    putc(a,((__getreent())->_stdout));

    return;

    }更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • 简而言之,pre-compile 后,compiler 用真正的东西代替了“宏”(MACRO)等编译器的代号, 并把结果塞到一个文件中去了。