preprocess: "assign PARSE_FLAG_ASM_COMMENTS only for asm files"
commit2df290073b04de51b699e58dde943afaeb0757dc
authorseyko <seyko2@gmail.com>
Mon, 27 Apr 2015 12:25:49 +0000 (27 15:25 +0300)
committerseyko <seyko2@gmail.com>
Mon, 27 Apr 2015 12:25:49 +0000 (27 15:25 +0300)
tree6cc96c9de536eb188d4d0a561e9b2531b45b4e1f
parent2d3458363e4e529d80030a648a806fef0c13cf71
preprocess: "assign PARSE_FLAG_ASM_COMMENTS only for asm files"

    resolve a problem with the following test.c program, tcc -E test.c

    #ifdef _XOPEN_SOURCE
    # define __USE_XOPEN 1
    # if (_XOPEN_SOURCE - 0) >= 500
    #  define __USE_XOPEN_EXTENDED 1
    #  define __USE_UNIX98 1
    #  undef _LARGEFILE_SOURCE
    #  define _LARGEFILE_SOURCE 1
    #  if (_XOPEN_SOURCE - 0) >= 600
    #   define __USE_XOPEN2K 1
    #   undef __USE_ISOC99
    #   define __USE_ISOC99 1
    #  endif
    # else
    #  ifdef _XOPEN_SOURCE_EXTENDED
    #   define __USE_XOPEN_EXTENDED 1
    #  endif
    # endif
    #endif

    int main() {}

    // # 17 "aaa.c"
    // aaa.c:17: error: #endif without matching #if
libtcc.c
tccpp.c