This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpp.texi tweaks
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: cpp.texi tweaks
- From: "Zack Weinberg" <zackw at Stanford dot EDU>
- Date: Fri, 15 Jun 2001 16:58:40 -0700
- Cc: gcc-patches at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>
On Sat, Jun 16, 2001 at 12:36:38AM +0100, Neil Booth wrote:
> Zack,
>
> Thanks ever so much for your excellent rewrite. I've read it all; the
> manual reads very naturally now, and is (IMO) a lot more informative.
> If your lucid explanation of variadic macros doesn't convince the C
> committee that GCC's extensions are worth supporting, nothing will.
>
> I've found a few inaccuracies and other nits, which this patch fixes
> or clarifies. It passes make info and make cpp.1.
I have a couple of problems with these changes; see below.
As long as you're making corrections, could you fix what it says about
the definition of __STRICT_ANSI__? See PR other/3199.
> @@ -986,7 +986,7 @@ These rules are implementation-defined b
> standard. To minimize the risk of different compilers interpreting your
> computed includes differently, we recommend you use only a single
> object-like macro which expands to a string constant. This will also
> -minimize confusion of people reading your program.
> +minimize any confusion to people reading your program.
Your wording makes less sense to me.
> @@ -1636,7 +1634,7 @@ eprintf("success!\n", );
> @expansion{} fprintf(stderr, "success!\n", );
> @end example
>
> -GNU CPP has a pair of extensions which deal with this problem. First,
> +GNU CPP has a pair of extensions which deals with this problem. First,
> you are allowed to leave the variable argument out entirely:
I think ... which deal ... is the appropriate form. The referent is
the _pair_ of extensions, which is a plural thing.
This may be British vs. American usage.
> @@ -3022,15 +3020,17 @@ effect. In addition, @var{filename} is
> following line and all subsequent lines are reported to come from the
> file it specifies, until something else happens to change that.
>
> -@item #line @var{linenum} @var{filename} @var{flags@dots{}}
> -This form is a GCC extension. @var{linenum} and @var{filename} are the
> -same as the second form. The @var{flags} are small positive integers,
> -which have the same meaning as the flags which can appear at the end of a
> -linemarker in the preprocessor's output. @xref{Preprocessor Output}.
> -
> @item #line @var{anything else}
> @var{anything else} is checked for macro calls, which are expanded.
> The result should match one of the above three forms.
> +
> +@item # @var{linenum} @var{filename} @var{flags@dots{}}
> +This form is a GCC extension. @var{linenum} and @var{filename} are the
> +same as the second form. The @var{flags} are small increasing positive
> +integers, which have the same meaning as the flags which can appear at
> +the end of a linemarker in the preprocessor's output.
> +@xref{Preprocessor Output}. Note that this form does not use the
> +directive name @samp{line}.
> @end table
It doesn't make sense to put another form _after_ the "anything else"
form, even if it happens to be an extension. Also, the "anything
else" paragraph refers to the "above _three_ forms", but with this
change there are only two.
> @@ -3311,8 +3311,8 @@ This is impossible in ISO C@.
>
> @item
> None of the GNU extensions to the preprocessor are available in
> -traditional mode, with the exception of assertions, and those may be
> -removed in the future.
> +traditional mode, with the exception of a partial implementation of
> +assertions, and those may be removed in the future.
What's left out of the assertion implementation?
> @@ -3817,8 +3818,7 @@ means the same as if @option{-} had been
> All single-letter options which take an argument may have that argument
> appear immediately after the option letter, or with a space between
> option and argument: @option{-Ifoo} and @option{-I foo} have the same
> -effect. Long options that take arguments require a space between option
> -and argument.
> +effect.
Is it not true that '-isystem/foo/bar/baz' is rejected?
(experiments...) Huh, it isn't. In that case, you should change the
previous couple of lines as well, take out 'single-letter' between
'All' and 'options', and 'letter' between 'option' and 'or with...'
I meant to insert here a note like the one in invoke.texi where it
points out that you cannot combine single letter options, `-dM' is not
the same thing as `-d' `-M'...
> @@ -4133,8 +4133,10 @@ is applied to the standard system direct
> Indicate to the preprocessor that the input file has already been
> preprocessed. This suppresses things like macro expansion, trigraph
> conversion, escaped newline splicing, and processing of most directives.
> -In this mode the integrated preprocessor is little more than a tokenizer
> -for the front ends.
> +The preprocessor still recognizes and removes comments, so that you can
> +pass a file preprocessed with @option{-C} to the compiler without
> +problems. In this mode the integrated preprocessor is little more than
> +a tokenizer for the front ends.
You need to correct invoke.texi on this one as well.
--
zw The master came to a yatai which was selling hot dogs. 'What do you
want on your hot dog?' he was asked. 'Nothing,' he replied. Then the
hot dog was enlightened.
-- a koan by Eric Hallstrom