Christopher Li wrote: > On Sat, Jul 18, 2009 at 1:37 PM, Ramsay Jones<ramsay@xxxxxxxxxxxxxxxxxxx> wrote: >> This attribute was introduced in gcc 3.5. In order to avoid >> such warnings, add a gcc version check when defining the >> SENTINEL_ATTR macro. (This warning message, in particular, >> was issued by a gcc 3.4.4 compiler). > > Can you elaborate the error message you received? > A small test program would be great. > > Thanks $ touch parse.c $ make OS=cygwin parse.o CC parse.o parse.c:558: warning: `__sentinel__' attribute directive ignored parse.c: In function `external_declaration': parse.c:2619: warning: enumeration value `SYM_UNINITIALIZED' not handled in switch parse.c:2619: warning: enumeration value `SYM_PREPROCESSOR' not handled in switch parse.c:2619: warning: enumeration value `SYM_BASETYPE' not handled in switch parse.c:2619: warning: enumeration value `SYM_NODE' not handled in switch parse.c:2619: warning: enumeration value `SYM_PTR' not handled in switch parse.c:2619: warning: enumeration value `SYM_FN' not handled in switch parse.c:2619: warning: enumeration value `SYM_ARRAY' not handled in switch parse.c:2619: warning: enumeration value `SYM_TYPEDEF' not handled in switch parse.c:2619: warning: enumeration value `SYM_TYPEOF' not handled in switch parse.c:2619: warning: enumeration value `SYM_MEMBER' not handled in switch parse.c:2619: warning: enumeration value `SYM_BITFIELD' not handled in switch parse.c:2619: warning: enumeration value `SYM_LABEL' not handled in switch parse.c:2619: warning: enumeration value `SYM_FOULED' not handled in switch parse.c:2619: warning: enumeration value `SYM_KEYWORD' not handled in switch parse.c:2619: warning: enumeration value `SYM_BAD' not handled in switch $ Note the first gcc warning. (The other warnings relate to patch #2) Maybe this is easier to see: $ make OS=cygwin CFLAGS=-Wno-switch-enum parse.o CC parse.o parse.c:558: warning: `__sentinel__' attribute directive ignored $ Note also, that gcc 3.4.4 does not understand -Wno-attributes. (ie I tried that alternative and it didn't work :( ). My cygwin installation is about 2 years old and, unfortunately, I can't update it on this machine. (The current cygwin gcc is at version 4.3.0). Since this is due to an old gcc, maybe the simplest thing is for me to just keep rebasing this patch in my cygwin repo. I don't need it on Linux. ATB, Ramsay Jones -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html