From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Buck To: richbaum@acm.org Cc: gcc@gcc.gnu.org Subject: Re: Trigraph warnings when compiling linux-2.4.0-prerelease1 Date: Mon, 01 Jan 2001 15:16:00 -0000 Message-id: <200101012315.PAA08380@racerx.synopsys.com> References: <3A507E7C.4279.3313E2@localhost> X-SW-Source: 2001-01/msg00014.html > 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.