This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: invalid preprocessing directive #warn


On Fri, Dec 08, 2000 at 10:59:25AM +1100, Alan Modra wrote:
> On Thu, 7 Dec 2000, John David Anglin wrote:
> 
> > The following error occurs with todays source under i686 linux with gcc-2.97:
> > 
> > ../../include/coff/ti.h:48:2: invalid preprocessing directive #warn
> 
> I've committed the obvious fix to return this to compiling OK, at least
> with gcc.  If there is any further attention needed, I'm sure Timothy Wall
> (why isn't he listed as binutils ti maintainer?) will provide it.
> 
> --- include/coff/ti.h~  Mon May 29 08:56:27 2000
> +++ include/coff/ti.h   Fri Dec  8 10:17:13 2000
> @@ -45,7 +45,7 @@
>  
>  /* This value is made available in the rare case where a bfd is unavailable */
>  #ifndef OCTETS_PER_BYTE_POWER
> -#warn OCTETS_PER_BYTE_POWER not defined for this CPU, it will default to 0
> +#warning OCTETS_PER_BYTE_POWER not defined for this CPU, it will default to 0
>  #else
>  #define OCTETS_PER_BYTE (1<<OCTETS_PER_BYTE_POWER)
>  #endif

Ummm, even using #warning will prevent it from any non-GCC compiler from
compiling the file.  If you use #error, it prevents any pre-ISO C compiler from
compiling the file (even if OCTETS_PER_BYTE_POWER is defined), unless there is
a space before the '#' (since old traditional cpp's didn't support leading
spaces).

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]