From owner-freebsd-bugs Thu Jul 25 16:20:06 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA09656 for bugs-outgoing; Thu, 25 Jul 1996 16:20:06 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA09632; Thu, 25 Jul 1996 16:20:04 -0700 (PDT) Date: Thu, 25 Jul 1996 16:20:04 -0700 (PDT) Message-Id: <199607252320.QAA09632@freefall.freebsd.org> To: freebsd-bugs Cc: From: "Andrew L. Moore" Subject: Re: ports/1416: cflow(1) doesn't parse GNU C __attribute__ syntax Reply-To: "Andrew L. Moore" Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR ports/1416; it has been noted by GNATS. From: "Andrew L. Moore" To: Bill Fenner Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: ports/1416: cflow(1) doesn't parse GNU C __attribute__ syntax Date: Thu, 25 Jul 1996 16:16:41 -0700 The macro `-D__attribute__(x)=' is still needed in cflow(1), whether the `-g' option is specified or not. Someone added __attribute__ to the gnu_keywords list in prcc.c. This is wrong, since __attribute__ defines not just a new C type, but a new C grammar as well. For portability, I suggest the following. >From the end-user's standpoint, it would be nice if `cflow *.c' "just worked." Maybe borrow from the GNU autoconf `configure' script: cat >${TMPFILE}.c <<\EOF #ifdef __GNUC__ yes; #endif EOF if ${CPP} ${TMPFILE}.c | egrep yes >/dev/null 2>&1; then CPP="${CPP} -D__attribute__(x)=" fi rm -f ${TMPFILE}.c