tccpp.c: fix GNU comma handling

This requires moving TOK_PLCHLDR handling, but the new logic should make
things easier even if (when?) GNU comma handling is removed.

(Somewhat confusingly, GCC no longer supports GNU commas. See
http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html for a description
of past and current GCC behaviour.)
This commit is contained in:
Philip
2015-05-02 14:27:49 +00:00
parent 2f50cefbd4
commit 2f90db434e
2 changed files with 36 additions and 20 deletions

1
tcc.h
View File

@ -880,6 +880,7 @@ struct TCCState {
#define TOK_DOTS 0xcc /* three dots */
#define TOK_SHR 0xcd /* unsigned shift right */
#define TOK_NOSUBST 0xcf /* means following token has already been pp'd */
#define TOK_GNUCOMMA 0xd0 /* ,## preprocessing token */
#define TOK_SHL 0x01 /* shift left */
#define TOK_SAR 0x02 /* signed shift right */