Sender: nate AT cartsys DOT com Message-ID: <37A3AC5B.59219A88@cartsys.com> Date: Sat, 31 Jul 1999 19:09:31 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.10 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: __attribute__((unused)), gcc get's confused...? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > > On Mon, 26 Jul 1999, Endlisnis wrote: > > > b.cc(1) Error: parse error before `__attribute__' > > In function `int main(...)': > > I don't think you said it was a C++ program in your original message > (if you did, I missed it and I apologize). __attribute__ support in > the C++ compiler has several bugs, up to and including the current > pretest versions of GCC 2.95. FWIW, your example compiles without any > problems as a C program. You can get the same effect (silencing the warning) by inserting a dummy statement in the function that casts the variable to void. i.e. void foo(int unused) { ... (void)unused; ... } -- Nate Eldredge nate AT cartsys DOT com