public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* va-960.h warning
@ 1998-05-02  8:38 Joel Sherrill
  1998-05-02 10:47 ` Richard Henderson
  1998-05-03 17:14 ` Jim Wilson
  0 siblings, 2 replies; 3+ messages in thread
From: Joel Sherrill @ 1998-05-02  8:38 UTC (permalink / raw)
  To: egcs

Hi,

While investigating warning messages, I came across one caused by the
definition of va_end in va-960.h in egcs-1.0.2.  The definition is:

#ifndef va_end
void va_end (__gnuc_va_list);           /* Defined in libgcc.a */
#endif
#define va_end(AP)      ((void *)0)

And causes this warning:

file:NNN: warning: statement with no effect

Wouldn't the following avoid a warning?

#define va_end(AP)  

--joel
Joel Sherrill                    Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (205) 722-9985



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: va-960.h warning
  1998-05-02  8:38 va-960.h warning Joel Sherrill
@ 1998-05-02 10:47 ` Richard Henderson
  1998-05-03 17:14 ` Jim Wilson
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 1998-05-02 10:47 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: egcs

On Sat, May 02, 1998 at 10:38:45AM -0500, Joel Sherrill wrote:
> Wouldn't the following avoid a warning?
> 
> #define va_end(AP)  

Yes, but then is no longer valid in the place of an expression, eg

	(va_end(args), foo())

Does

#define va_end(AP)	((void)0)

solve your warning?  I think that's what the original author was 
after anyway.


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: va-960.h warning
  1998-05-02  8:38 va-960.h warning Joel Sherrill
  1998-05-02 10:47 ` Richard Henderson
@ 1998-05-03 17:14 ` Jim Wilson
  1 sibling, 0 replies; 3+ messages in thread
From: Jim Wilson @ 1998-05-03 17:14 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: egcs

As Richard Henderson mentioned, the bug is that (void *) should be (void).
This has already been fixed in the development sources.

Jim

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-05-03 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-02  8:38 va-960.h warning Joel Sherrill
1998-05-02 10:47 ` Richard Henderson
1998-05-03 17:14 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).