swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interesting new GCC warning


From: Ken Cline
Subject: Re: Interesting new GCC warning
Date: Fri, 19 Mar 1999 20:55:43 -0500 (EST)

On Fri, 19 Mar 1999, Paul E. Johnson wrote:

> When I used egcs to compile the example test code you
> sent, I got a warning I had never seen before.  Have you
> seen this too? What do you think? 
> 
> main.m:1: warning: using `#import' is not recommended
> The fact that a certain header file need not be processed
> more than once should be indicated in the header file, not
> where it is used. The best way to do this is with a
> conditional of this form:
> 
>   #ifndef _FOO_H_INCLUDED
>   #define _FOO_H_INCLUDED
>   ... <real contents of file> ...
>   #endif /* Not _FOO_H_INCLUDED */
> 
> Then users can use `#include' any number of times.
> GNU C automatically avoids processing the file more than
> once when it is equipped with such a conditional.

This warning has been around for awhile, although I don't
remember being so verbose. The Swarm makefiles use (or used
to use) the "-Wno-import" option to quiet the compiler.


_________________________________________________________
Ken Cline                             address@hidden
SAIC                                 VOICE (410) 571-0413
Annapolis, MD                          FAX (301) 261-8427



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]