This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Trigraph warnings when compiling linux-2.4.0-prerelease1
- To: richbaum at acm dot org
- Subject: Re: Trigraph warnings when compiling linux-2.4.0-prerelease1
- From: Joe Buck <jbuck at racerx dot synopsys dot com>
- Date: Mon, 1 Jan 2001 15:15:35 -0800 (PST)
- Cc: gcc at gcc dot gnu dot org
> 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.