Re: standards documents off-topic in comp.lang.c
Dan.Pop@cern.ch (Dan Pop) writes:[color=blue]
> In <lnvffi3jth.fsf @nuthaus.mib.or g> Keith Thompson <kst-u@mib.org> writes:[/color]
[...][color=blue][color=green]
> >Most such implementations provide a mode in which they
> >conform as closely as possible to the standard without extensions,
> >such as gcc's "-ansi -pedantic -W -Wall" or "-std=c99 -pedantic -W -Wall"
> >mode.[/color]
>
> You're confused/confusing here. First, the -W and -Wall options have
> absolutely nothing to do with standard conformance: they enable *only*
> diagnostics that are NOT required by any C standard. gcc has only one
> standard conforming mode and this is enabled using -ansi -pedantic, or,
> equivalently, -std=c89 -pedantic (I'm deliberately ignoring the option
> for C94 conformance, to keep things as simple as possible). -ansi
> disables gcc's deviations from the standard and -pedantic enables some
> required diagnostics that gcc doesn't generate by default.[/color]
I had assumed that "-W -Wall" enabled some required diagnostics, but
if you say "-ansi -pedantic" suffices, I'll take your word for it.
(Using "-W -Wall" as well is generally a good idea, but that's not
necessarily related to conformance.)
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Dan.Pop@cern.ch (Dan Pop) writes:[color=blue]
> In <lnvffi3jth.fsf @nuthaus.mib.or g> Keith Thompson <kst-u@mib.org> writes:[/color]
[...][color=blue][color=green]
> >Most such implementations provide a mode in which they
> >conform as closely as possible to the standard without extensions,
> >such as gcc's "-ansi -pedantic -W -Wall" or "-std=c99 -pedantic -W -Wall"
> >mode.[/color]
>
> You're confused/confusing here. First, the -W and -Wall options have
> absolutely nothing to do with standard conformance: they enable *only*
> diagnostics that are NOT required by any C standard. gcc has only one
> standard conforming mode and this is enabled using -ansi -pedantic, or,
> equivalently, -std=c89 -pedantic (I'm deliberately ignoring the option
> for C94 conformance, to keep things as simple as possible). -ansi
> disables gcc's deviations from the standard and -pedantic enables some
> required diagnostics that gcc doesn't generate by default.[/color]
I had assumed that "-W -Wall" enabled some required diagnostics, but
if you say "-ansi -pedantic" suffices, I'll take your word for it.
(Using "-W -Wall" as well is generally a good idea, but that's not
necessarily related to conformance.)
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Comment