From alm@slewsys.org  Sun Jul 21 17:48:02 1996
Received: from worm.slewsys.org (wormhole.slewsys.org [140.174.112.2])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA05997
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Jul 1996 17:48:00 -0700 (PDT)
Received: from woops.slewsys.org (woops.slewsys.org [140.174.112.3]) by worm.slewsys.org (8.7.4/8.7.3) with ESMTP id RAA10463 for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Jul 1996 17:47:57 -0700 (PDT)
Received: (from alm@localhost) by woops.slewsys.org (8.7.4/8.7.3) id RAA19465; Sun, 21 Jul 1996 17:47:57 -0700 (PDT)
Message-Id: <199607220047.RAA19465@woops.slewsys.org>
Date: Sun, 21 Jul 1996 17:47:57 -0700 (PDT)
From: Andrew Moore <alm@slewsys.org>
Reply-To: alm@slewsys.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: cflow(1) doesn't parse GNU C __attribute__ syntax
X-Send-Pr-Version: 3.2

>Number:         1416
>Category:       ports
>Synopsis:       cflow(1) doesn't parse GNU C __attribute__ syntax
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 21 17:50:00 PDT 1996
>Closed-Date:    Sun Jul 26 16:56:52 PDT 1998
>Last-Modified:  Sun Jul 26 16:57:31 PDT 1998
>Originator:     Andrew L. Moore
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
SlewSys Research
>Environment:

	GNU C >= 2.6

>Description:

	The cflow(1) parser does not understand the GNU C __attribute__
	syntax.

>How-To-Repeat:

	Run cflow(1) on source that uses the __attribute__ syntax
	-- e.g., include <sys/cdefs.h>

>Fix:
	
	In the cflow shell script, change the preprocessor
	command line from "cc -E" to "cc -E -D__attribute__(x)="
	This strips both function and variable attributes from the
	input and makes the cflow(1) parser happy.


>Release-Note:
>Audit-Trail:

From: Bill Fenner <fenner@parc.xerox.com>
To: alm@slewsys.org
Cc: FreeBSD-gnats-submit@freebsd.org, ports@freebsd.org,
        dchapes@zeus.leitch.com
Subject: Re: ports/1416: cflow(1) doesn't parse GNU C __attribute__ syntax 
Date: Thu, 25 Jul 1996 12:43:26 PDT

 In message <199607220047.RAA19465@woops.slewsys.org>you write:
 >>Fix:
 >	
 >	In the cflow shell script, change the preprocessor
 >	command line from "cc -E" to "cc -E -D__attribute__(x)="
 
 Actually, I think that using "cflow -g" is more correct.  Should the cflow 
 port be modified to add the "-g" flag by default?
 
   Bill
 

From: "Andrew L. Moore" <alm@woops.slewsys.org>
To: Bill Fenner <fenner@parc.xerox.com>
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
Responsible-Changed-From-To: freebsd-bugs->bde 
Responsible-Changed-By: wosch 
Responsible-Changed-When: Wed Sep 25 17:10:33 PDT 1996 
Responsible-Changed-Why:  
gcc problem. 
Responsible-Changed-From-To: bde->freebsd-bugs 
Responsible-Changed-By: bde 
Responsible-Changed-When: Tue Dec 17 04:36:22 PST 1996 
Responsible-Changed-Why:  
Application problem.  I won't be fixing this. 
cflow needs to fully understand __attribute__ or it may lose when 
the attributes are important. 

From: "David E. O'Brien" <obrien@NUXI.com>
To: freebsd-gnats-submit@freebsd.org, alm@woops.slewsys.org
Cc:  Subject: Re: ports/1416: cflow(1) doesn't parse GNU C __attribute__ syntax
Date: Fri, 14 Feb 1997 04:59:37 -0800

 I've sent a copy of the PR to the maintain.  Lets see if he can fix it.
 -- David	(obrien@NUXI.com  -or-  obrien@FreeBSD.org)
Responsible-Changed-From-To: freebsd-bugs->freebsd-ports 
Responsible-Changed-By: obrien 
Responsible-Changed-When: Mon Jul 14 18:47:48 PDT 1997 
Responsible-Changed-Why:  
wrong group 
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sun Jul 26 16:56:52 PDT 1998 
State-Changed-Why:  
Patch finally submitted.  Thanks. 
>Unformatted:
