This is the mail archive of the mailing list for the GCC project.

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

Re: Trigraph warnings when compiling linux-2.4.0-prerelease1

> I get the following warnings when compiling the latest linux kernel 
> with the 20001225 gcc snapshot:
> devlist.h:1278:33: warning: trigraph ??) ignored
> The lines are as follows:
> devlist.h:
> line 1278: 	DEVICE(109e,036c,"Bt879(??) Video Capture")
> line 6370:   VENDOR(2a15,"3D Vision(???)")
> imm.c:
> line 929: 	printk("imm: parity error (???)\n");
> line 938: 	printk("imm: bad interrupt (???)\n");

This is a kernel bug.  That is, a strict ISO C compiler
must print

imm: bad interrupt (?]

for the last line, since ??) is the trigraph for ].  Many C compilers
other than gcc will just print that and never tell you there's a problem.

By default, gcc disables trigraphs, but if you give the -ansi flag
they are enabled.  But it warns about inputs that give different behavior
with and without trigraphs.

> them?  I felt this would be the appropriate list to send this to since 
> it compiles without these warnings with egcs-1.1.2.

You just found a bug in egcs-1.1.2 then.

The kernel should be changed, to, for example

> line 938: 	printk("imm: bad interrupt (??\?)\n");

Please direct complaints to the ANSI C committee for inflicting this
trigraphs botch on us all.

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