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

Patch for -pedantic -std=gnu* documentation


This patch documents what -pedantic does with -std=gnu*, since this
has confused some people.  It passes "make info".  Applied to mainline
and branch.

2001-05-20  Joseph S. Myers  <jsm28@cam.ac.uk>

	* invoke.texi: Document meaning of -pedantic when -std=gnu* is
	used.  Fixes PR c/2291.
	* gcc.1: Regenerate.

--- invoke.texi.orig	Mon May  7 16:09:18 2001
+++ invoke.texi	Sun May 20 12:38:41 2001
@@ -1677,6 +1677,16 @@
 be quite different from @samp{-pedantic}.  We don't have plans to
 support such a feature in the near future.
 
+Where the standard specified with @option{-std} represents a GNU
+extended dialect of C, such as @samp{gnu89} or @samp{gnu99}, there is a
+corresponding @dfn{base standard}, the version of ISO C on which the GNU
+extended dialect is based.  Warnings from @option{-pedantic} are given
+where they are required by the base standard.  (It would not make sense
+for such warnings to be given only for features not in the specified GNU
+C dialect, since by definition the GNU dialects of C include all
+features the compiler supports with the given option, and there would be
+nothing to warn about.)
+
 @item -pedantic-errors
 Like @samp{-pedantic}, except that errors are produced rather than
 warnings.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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