[gnu.gcc.bug] gcc 1.35 dislikes #ifdef ecd.color

dove@uunet.uu.net (Webster Dove) (07/27/89)

Is that a gcc bug, or an ansi violation on suns part


/usr/include/suntool/panel.h:35: warning: garbage at end of #ifdef argument

/* new attributes should start at PANEL_LAST_ATTR + 1 */
#ifdef ecd.color
#define	PANEL_LAST_ATTR			127
#else
#define	PANEL_LAST_ATTR			125
#endif

Ed@ALDERAAN.SCRC.SYMBOLICS.COM (Ed Schwalenberg) (07/28/89)

    Date: Thu, 27 Jul 89 12:09:14 EDT
    From: Webster Dove <rocket!hobbes!dove@uunet.uu.net>

    Is that a gcc bug, or an ansi violation on suns part


    /usr/include/suntool/panel.h:35: warning: garbage at end of #ifdef argument

    /* new attributes should start at PANEL_LAST_ATTR + 1 */
    #ifdef ecd.color
    #define	PANEL_LAST_ATTR			127
    #else
    #define	PANEL_LAST_ATTR			125
    #endif

It's not ANSI, it's not even K&R.  The identifiers for #ifdef are the same
as C identifiers; they can't have '.' characters in them.  That #ifdef has
been parsed by Sun's CC as #ifdef ecd, which just happened to "work".