Re: warning: trigraph ... ignored

From: H. Peter Anvin (hpa@zytor.com)
Date: Thu Jun 15 2000 - 00:23:39 EST


Followup to: <20000614233557.C18588@Marvin.DL8BCU.ampr.org>
By author: Thorsten Kranzkowski <th@Marvin.DL8BCU.ampr.org>
In newsgroup: linux.dev.kernel
>
> Hi!
> With a recent gcc snapshot (2.96 20000530) I see lots of those warnings.
>
> > ----- Forwarded message from Joe Buck <jbuck@racerx.synopsys.com> -----
> >
> > From: Joe Buck <jbuck@racerx.synopsys.com>
> > Subject: Re: warning: trigraph ... ignored
> > To: dl8bcu@gmx.net
> > Date: Tue, 13 Jun 2000 18:22:47 -0700 (PDT)
> > Cc: gcc@gcc.gnu.org
> > In-Reply-To: <20000613223216.A12898@Marvin.DL8BCU.ampr.org> from "Thorsten Kranzkowski" at Jun 13, 2000 10:32:16 PM
> > X-Mailer: ELM [version 2.5 PL2]
> >
> > > Hi!
> > > During my latest linux kernel compile I saw several of these warnings:
> > >
> > > gcc -D__KERNEL__ -I/usr/src/linux-2.4.0-test1-ac18-work/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mno-fp-regs -ffixed-8 -mcpu=ev4 -Wa,-mev6 -DEXPORT_SYMTAB -c md.c
> > > In file included from /usr/src/linux-2.4.0-test1-ac18-work/include/linux/raid/md.h:35,
> > > from md.c:32:
> > > /usr/src/linux-2.4.0-test1-ac18-work/include/linux/delay.h:19:44: warning: trigraph ??/ ignored
> >
> > -Wall turns on -Wtrigraphs. ANSI says trigraph processing happens even
> > in comments, and there are very rare cases where they could conceivably
> > make a difference (though not in this one). ??/ is turned into \.
> >
> > Adding -Wno-trigraphs after -Wall should shut up the compiler.
> >

This is obviously a gcc bug. The documentation says:

`-Wtrigraphs'
     Warn if any trigraphs are encountered (assuming they are
     enabled).

It also says:

`-trigraphs'
     Support ANSI C trigraphs. You don't want to know about this
     brain-damage. The `-ansi' option implies `-trigraphs'.

There is no -no-trigraphs option.

We don't *want* trigraphs, since they invoke behaviour that is
generally unexpected. There is nothing on that command line that
should have turned trigraphs on. Thus, I conclude that the
-Wtrigraphs option is broken in the version of gcc you're using (2.96,
right?) and that this bug should be reported.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:34 EST