This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: strict_prototypes_lang_c
- To: jbuck at Synopsys dot COM (Joe Buck)
- Subject: Re: strict_prototypes_lang_c
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Thu, 17 Dec 1998 06:49:30 +0000 (GMT)
- Cc: law at cygnus dot com, gavin at cygnus dot com, egcs at cygnus dot com
>
> > In message <13942.31893.760353.315840@cetus.cygnus.com>you write:
> > > > Personally, I agree.
> > >
> > > >From this thread it sounded like the primary reason for turning
> > > on -trigraphs is to make "what's on by default" be a superset of
> > > ANSI/ISO because that would make the options simpler. If I
> > > understood this correctly, I think it's a mistake.
> > I can't speak for Mark, but for myself, it's merely a standards conformance
> > issue. When in doubt I'll err on the side of following a standard instead of
> > doing something non-standard.
>
> OK, how about making -trigraph -Wtrigraph the default. That is, by
> default recognize but warn about trigraphs. I suspect even RMS would be
> happy with that: we know what trigraphs are but "disapprove". -ansi or
> -pedantic could turn off -Wtrigraph.
turning off warings with -ansi sounds weird to me. Tunring it off with
-pedantic even more so.
The standard allows the compiler to emit as many warnings as it likes,
so this is not a conformance issue.
Moreover, even if all C compilers handled trigraphs, there is still the
issue that they can confuse programmers, and programming tools like
lint, yacc or grep.
So it makes sense to warn about trirgaphs unless you shut the warning off
with -Wno-trigraphs .