This is the mail archive of the gcc@gcc.gnu.org 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]

warning: trigraph ... ignored - again



Hello again!

It seems that gcc shouldn't warn about trigraphs at all because it shouldn't 
care about them by default. Neither -ansi nor -trigraph were passed to gcc
so trigraph processing is disabled (or should be...).

----- Forwarded message from "H. Peter Anvin" <hpa@zytor.com> -----
> 
> To: linux-kernel@vger.rutgers.edu
> From: "H. Peter Anvin" <hpa@zytor.com>
> Subject: Re: warning: trigraph ... ignored
> Date: 	14 Jun 2000 22:23:39 -0700
> 
> > 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
----- End forwarded message -----

So even if -Wall activates -Wtrigraphs gcc shouldn't emit Warnings because 
trigraphs are _not_ enabled.


Bye,
Thorsten

Please CC: me, as I'm not on the list.

-- 
| Thorsten Kranzkowski        Internet: dl8bcu@gmx.net                        |
| Mobile: ++49 170 1876134       Snail: Niemannsweg 30, 49201 Dissen, Germany |
| Ampr: dl8bcu@db0lj.#rpl.deu.eu, dl8bcu@marvin.dl8bcu.ampr.org [44.130.8.19] |

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