public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch, RFA] -no-integrated-cpp documentation
@ 2012-03-11 14:29 Sandra Loosemore
  2012-03-11 14:37 ` Gerald Pfeifer
  2012-03-12  1:11 ` Joseph S. Myers
  0 siblings, 2 replies; 3+ messages in thread
From: Sandra Loosemore @ 2012-03-11 14:29 UTC (permalink / raw)
  To: gcc-patches; +Cc: neil, Joseph S. Myers

[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]

While I've been cleaning up invoke.texi I noticed that the blurb about 
-no-integrated-cpp needed some copy-editing and markup changes.  Then I 
noticed that the description didn't make a whole lot of sense, and that 
it talked about what might happen in the hypothetical case that 
cc1/cc1plus/cc1obj are merged, which I think only further confused 
things.  And, I further noticed that this option was documented with the 
C Dialect Options instead of the Preprocessor Options, which is where 
users might be most likely to look for it.

I dug up the original discussion that led to this option being added 
back in 2003 -- it's here:

http://gcc.gnu.org/ml/gcc/2002-12/msg01163.html

Based on that and reading the code, I've tried to rewrite the 
documentation so it makes more sense.  Did I get this right?  If I'm 
understanding the intended purpose of this option correctly, it sounds 
like a really convoluted hack and maybe not what the manual ought to 
recommend.  (If you really want to do stuff with the preprocessed code 
before compiling it, why not just write a makefile rule or a shell 
script to use as your $(CC)?)  But, I think we have a gazillion other 
useless options too, and it's probably more trouble to remove than it's 
worth....

Anyway, I'd appreciate another pair of eyes looking at this, and 
suggestions on what better to do here if this rewrite isn't adequate.

-Sandra


2012-03-11  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi (Option Summary): Move -no-integrated-cpp
	from C Language Options to Preprocessor Options.
	(C Dialect Options): Move -no-integrated-cpp documentation
	from here...
	(Preprocessor Options): ...to here.  Rewrite the description
	so it makes more sense, and remove discussion of merging
	front ends.



[-- Attachment #2: gcc-no-integrated-cpp.patch --]
[-- Type: text/x-patch, Size: 2853 bytes --]

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 185168)
+++ gcc/doc/invoke.texi	(working copy)
@@ -174,7 +174,7 @@ in the following sections.
 -aux-info @var{filename} -fallow-parameterless-variadic-functions @gol
 -fno-asm  -fno-builtin  -fno-builtin-@var{function} @gol
 -fhosted  -ffreestanding -fopenmp -fms-extensions -fplan9-extensions @gol
--trigraphs  -no-integrated-cpp  -traditional  -traditional-cpp @gol
+-trigraphs  -traditional  -traditional-cpp @gol
 -fallow-single-precision  -fcond-mismatch -flax-vector-conversions @gol
 -fsigned-bitfields  -fsigned-char @gol
 -funsigned-bitfields  -funsigned-char}
@@ -433,7 +433,7 @@ Objective-C and Objective-C++ Dialects}.
 -M  -MM  -MF  -MG  -MP  -MQ  -MT  -nostdinc  @gol
 -P  -fdebug-cpp -ftrack-macro-expansion -fworking-directory @gol
 -remap -trigraphs  -undef  -U@var{macro}  @gol
--Wp,@var{option} -Xpreprocessor @var{option}}
+-Wp,@var{option} -Xpreprocessor @var{option} -no-integrated-cpp}
 
 @item Assembler Option
 @xref{Assembler Options,,Passing Options to the Assembler}.
@@ -1794,17 +1794,6 @@ supported for C, not C++.
 Support ISO C trigraphs.  The @option{-ansi} option (and @option{-std}
 options for strict ISO C conformance) implies @option{-trigraphs}.
 
-@item -no-integrated-cpp
-@opindex no-integrated-cpp
-Performs a compilation in two passes: preprocessing and compiling.  This
-option allows a user supplied "cc1", "cc1plus", or "cc1obj" via the
-@option{-B} option.  The user supplied compilation step can then add in
-an additional preprocessing step after normal preprocessing but before
-compiling.  The default is to use the integrated cpp (internal cpp)
-
-The semantics of this option will change if "cc1", "cc1plus", and
-"cc1obj" are merged.
-
 @cindex traditional C language
 @cindex C language, traditional
 @item -traditional
@@ -9300,6 +9289,21 @@ recognize.
 
 If you want to pass an option that takes an argument, you must use
 @option{-Xpreprocessor} twice, once for the option and once for the argument.
+
+@item -no-integrated-cpp
+@opindex no-integrated-cpp
+Perform preprocessing as a separate pass before compilation.
+By default, GCC performs preprocessing as an integrated part of
+input tokenization and parsing.
+If this option is provided, the appropriate language front end
+(@command{cc1}, @command{cc1plus}, or @command{cc1obj} for C, C++,
+and Objective-C, respectively) is instead invoked twice,
+once for preprocessing only and once for actual compilation
+of the preprocessed input.
+This option may be useful in conjunction with the @option{-B} or
+@option{-wrapper} options to specify an alternate preprocessor or
+perform additional processing of the program source between
+normal preprocessing and compilation.
 @end table
 
 @include cppopts.texi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch, RFA] -no-integrated-cpp documentation
  2012-03-11 14:29 [patch, RFA] -no-integrated-cpp documentation Sandra Loosemore
@ 2012-03-11 14:37 ` Gerald Pfeifer
  2012-03-12  1:11 ` Joseph S. Myers
  1 sibling, 0 replies; 3+ messages in thread
From: Gerald Pfeifer @ 2012-03-11 14:37 UTC (permalink / raw)
  To: Sandra Loosemore; +Cc: gcc-patches, neil, Joseph S. Myers

[-- Attachment #1: Type: TEXT/PLAIN, Size: 648 bytes --]

On Sun, 11 Mar 2012, Sandra Loosemore wrote:
> Anyway, I'd appreciate another pair of eyes looking at this, and 
> suggestions on what better to do here if this rewrite isn't adequate.

Looks good to me, but better wait for Joseph's take.

Gerald

> 2012-03-11  Sandra Loosemore  <sandra@codesourcery.com>
> 
> 	gcc/
> 	* doc/invoke.texi (Option Summary): Move -no-integrated-cpp
> 	from C Language Options to Preprocessor Options.
> 	(C Dialect Options): Move -no-integrated-cpp documentation
> 	from here...
> 	(Preprocessor Options): ...to here.  Rewrite the description
> 	so it makes more sense, and remove discussion of merging
> 	front ends.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: TEXT/X-PATCH; NAME=gcc-no-integrated-cpp.patch, Size: 2853 bytes --]

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 185168)
+++ gcc/doc/invoke.texi	(working copy)
@@ -174,7 +174,7 @@ in the following sections.
 -aux-info @var{filename} -fallow-parameterless-variadic-functions @gol
 -fno-asm  -fno-builtin  -fno-builtin-@var{function} @gol
 -fhosted  -ffreestanding -fopenmp -fms-extensions -fplan9-extensions @gol
--trigraphs  -no-integrated-cpp  -traditional  -traditional-cpp @gol
+-trigraphs  -traditional  -traditional-cpp @gol
 -fallow-single-precision  -fcond-mismatch -flax-vector-conversions @gol
 -fsigned-bitfields  -fsigned-char @gol
 -funsigned-bitfields  -funsigned-char}
@@ -433,7 +433,7 @@ Objective-C and Objective-C++ Dialects}.
 -M  -MM  -MF  -MG  -MP  -MQ  -MT  -nostdinc  @gol
 -P  -fdebug-cpp -ftrack-macro-expansion -fworking-directory @gol
 -remap -trigraphs  -undef  -U@var{macro}  @gol
--Wp,@var{option} -Xpreprocessor @var{option}}
+-Wp,@var{option} -Xpreprocessor @var{option} -no-integrated-cpp}
 
 @item Assembler Option
 @xref{Assembler Options,,Passing Options to the Assembler}.
@@ -1794,17 +1794,6 @@ supported for C, not C++.
 Support ISO C trigraphs.  The @option{-ansi} option (and @option{-std}
 options for strict ISO C conformance) implies @option{-trigraphs}.
 
-@item -no-integrated-cpp
-@opindex no-integrated-cpp
-Performs a compilation in two passes: preprocessing and compiling.  This
-option allows a user supplied "cc1", "cc1plus", or "cc1obj" via the
-@option{-B} option.  The user supplied compilation step can then add in
-an additional preprocessing step after normal preprocessing but before
-compiling.  The default is to use the integrated cpp (internal cpp)
-
-The semantics of this option will change if "cc1", "cc1plus", and
-"cc1obj" are merged.
-
 @cindex traditional C language
 @cindex C language, traditional
 @item -traditional
@@ -9300,6 +9289,21 @@ recognize.
 
 If you want to pass an option that takes an argument, you must use
 @option{-Xpreprocessor} twice, once for the option and once for the argument.
+
+@item -no-integrated-cpp
+@opindex no-integrated-cpp
+Perform preprocessing as a separate pass before compilation.
+By default, GCC performs preprocessing as an integrated part of
+input tokenization and parsing.
+If this option is provided, the appropriate language front end
+(@command{cc1}, @command{cc1plus}, or @command{cc1obj} for C, C++,
+and Objective-C, respectively) is instead invoked twice,
+once for preprocessing only and once for actual compilation
+of the preprocessed input.
+This option may be useful in conjunction with the @option{-B} or
+@option{-wrapper} options to specify an alternate preprocessor or
+perform additional processing of the program source between
+normal preprocessing and compilation.
 @end table
 
 @include cppopts.texi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch, RFA] -no-integrated-cpp documentation
  2012-03-11 14:29 [patch, RFA] -no-integrated-cpp documentation Sandra Loosemore
  2012-03-11 14:37 ` Gerald Pfeifer
@ 2012-03-12  1:11 ` Joseph S. Myers
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph S. Myers @ 2012-03-12  1:11 UTC (permalink / raw)
  To: Sandra Loosemore; +Cc: gcc-patches, neil

On Sun, 11 Mar 2012, Sandra Loosemore wrote:

> 2012-03-11  Sandra Loosemore  <sandra@codesourcery.com>
> 
> 	gcc/
> 	* doc/invoke.texi (Option Summary): Move -no-integrated-cpp
> 	from C Language Options to Preprocessor Options.
> 	(C Dialect Options): Move -no-integrated-cpp documentation
> 	from here...
> 	(Preprocessor Options): ...to here.  Rewrite the description
> 	so it makes more sense, and remove discussion of merging
> 	front ends.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-12  1:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-11 14:29 [patch, RFA] -no-integrated-cpp documentation Sandra Loosemore
2012-03-11 14:37 ` Gerald Pfeifer
2012-03-12  1:11 ` Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).