Article View: gnu.gcc.bug
Article #6257g++ 2.7.2 __attribute__ on arguments fails?
From: Chris Metcalf
Date: Thu, 28 Dec 1995 00:00
Date: Thu, 28 Dec 1995 00:00
17 lines
1043 bytes
1043 bytes
The following code snippet compiles under gcc, but not under g++
(the message "foo.c:3: parse error before `__attribute__'" is produced;
tested under i386-linux and sun4).
void bar(void);
void foo(int arg __attribute__ ((unused)))
{
bar();
}
Am I using this attribute wrong? I want to be able to use "-W -Wunused"
to guard against legitimate mistakes, while flagging arguments that I
intend to be unused.
Chris Metcalf -- MIT Lab for Computer Science, +1 617 253 7766
metcalf@lcs.mit.edu -- http://cag-www.lcs.mit.edu/~metcalf
Technical Details
Message-ID:
<199512281604.LAA29840@catfish.lcs.mit.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,cb77f23b834bea30,start X-Google-Attributes: gid113d02,public From: metcalf@catfish.lcs.mit.edu (Chris Metcalf) Subject: g++ 2.7.2 __attribute__ on arguments fails? Date: 1995/12/28 Message-ID: <199512281604.LAA29840@catfish.lcs.mit.edu> X-Deja-AN: 123052119 distribution: gnu sender: daemon@cis.ohio-state.edu organization: GNUs Not Usenet newsgroups: gnu.gcc.bug