This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: "[PATCH] - refresh long lines in cppinit.c"
- To: Donn Terry <donnte at microsoft dot com>
- Subject: Re: "[PATCH] - refresh long lines in cppinit.c"
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Fri, 7 Jul 2000 22:12:54 -0700
- Cc: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- References: <309F4FC4705DC844987051A517E9E39BF5BCBE@red-pt-02.redmond.corp.microsoft.com>
On Fri, Jul 07, 2000 at 10:07:17PM -0700, Donn Terry wrote:
> Due to other changes, the prior version of this patch does not apply
> cleanly any longer, so here's a refresh.
>
> Some compilers choke on a single string that's too long. Break it up
> into ISO C (89) maximum size chunks. The compiler that ran into this
> could live with it broken into three chunks, and most others didn't notice
> at all, so this is probably more than strictly required. However, ZW asked
> for it to be minimal (509 characters (yup, five hundred and NINE, according
> to the standard!)), so 6 80 character lines is convieniently under that,
> and it's not worth trying to squeeze out the last little bit.
> (Translators... if you've already done this, I'm sorry about this. If not,
> it might(?) make life easier later.)
Thank you; please apply this patch.
In the future, please remember to send patches to gcc-patches@gcc.gnu.org.
(If they come out of a discussion on gcc or gcc-bugs, cc: that list as
well.)
zw
>
>
> 2000-07-03 Donn Terry (donnte@microsoft.com)
>
> * cppinit.c(print_help): split overlong line into ISO C maximum
> chunks.
>
> diff -drupP --exclude-from=//M/donn/diffs/exclude.files
> //S/CVS/egcs.baseline/gcc/cppinit.c gcc/cppinit.c
> --- //S/CVS/egcs.baseline/gcc/cppinit.c Mon Jan 31 11:29:48 2000
> +++ gcc/cppinit.c Tue Feb 8 14:07:35 2000
> @@ -1697,6 +1727,8 @@ static void
> print_help ()
> {
> fprintf (stderr, _("Usage: %s [switches] input output\n"), progname);
> + /* To keep the lines from getting too long for some compilers, limit
> + to about 500 characters (6 lines) per chunk. */
> fputs (_("\
> Switches:\n\
> -include <file> Include the contents of <file> before other
> files\n\
> @@ -1705,6 +1737,8 @@ Switches:\n\
> -iwithprefix <dir> Add <dir> to the end of the system include
> path\n\
> -iwithprefixbefore <dir> Add <dir> to the end of the main include
> path\n\
> -isystem <dir> Add <dir> to the start of the system include
> path\n\
> +"), stdout);
> + fputs (_("\
> -idirafter <dir> Add <dir> to the end of the system include
> path\n\
> -I <dir> Add <dir> to the end of the main include
> path\n\
> -I- Fine-grained include path control; see info
> docs\n\
> @@ -1712,6 +1746,8 @@ Switches:\n\
> (dirs specified with -isystem will still be
> used)\n\
> -nostdinc++ Do not search system include directories for
> C++\n\
> -o <file> Put output into <file>\n\
> +"), stdout);
> + fputs (_("\
> -pedantic Issue all warnings demanded by strict ISO C\n\
> -pedantic-errors Issue -pedantic warnings as errors instead\n\
> -traditional Follow K&R pre-processor behaviour\n\
> @@ -1719,11 +1755,15 @@ Switches:\n\
> -lang-c Assume that the input sources are in C\n\
> -lang-c89 Assume that the input sources are in C89\n\
> -lang-c++ Assume that the input sources are in C++\n\
> +"), stdout);
> + fputs (_("\
> -lang-objc Assume that the input sources are in
> ObjectiveC\n\
> -lang-objc++ Assume that the input sources are in
> ObjectiveC++\n\
> -lang-asm Assume that the input sources are in
> assembler\n\
> -lang-fortran Assume that the input sources are in
> Fortran\n\
> -lang-chill Assume that the input sources are in Chill\n\
> +"), stdout);
> + fputs (_("\
> -std=<std name> Specify the conformance standard; one of:\n\
> gnu89, gnu99, c89, c99, iso9899:1990,\n\
> iso9899:199409, iso9899:1999\n\
> @@ -1732,6 +1772,8 @@ Switches:\n\
> -Wtrigraphs Warn if trigraphs are encountered\n\
> -Wno-trigraphs Do not warn about trigraphs\n\
> -Wcomment{s} Warn if one comment starts inside another\n\
> +"), stdout);
> + fputs (_("\
> -Wno-comment{s} Do not warn about comments\n\
> -Wtraditional Warn if a macro argument is/would be turned
> into\n\
> a string if -traditional is specified\n\
> @@ -1739,24 +1781,32 @@ Switches:\n\
> -Wundef Warn if an undefined macro is used by #if\n\
> -Wno-undef Do not warn about testing undefined macros\n\
> -Wimport Warn about the use of the #import directive\n\
> +"), stdout);
> + fputs (_("\
> -Wno-import Do not warn about the use of #import\n\
> -Werror Treat all warnings as errors\n\
> -Wno-error Do not treat warnings as errors\n\
> -Wall Enable all preprocessor warnings\n\
> -M Generate make dependencies\n\
> -MM As -M, but ignore system header files\n\
> +"), stdout);
> + fputs (_("\
> -MD As -M, but put output in a .d file\n\
> -MMD As -MD, but ignore system header files\n\
> -MG Treat missing header file as generated files\n\
> -g3 Include #define and #undef directives in the
> output\n\
> -D<macro> Define a <macro> with string '1' as its
> value\n\
> -D<macro>=<val> Define a <macro> with <val> as its value\n\
> +"), stdout);
> + fputs (_("\
> -A<question> (<answer>) Assert the <answer> to <question>\n\
> -A-<question> (<answer>) Disable the <answer> to <question>\n\
> -U<macro> Undefine <macro> \n\
> -v Display the version number\n\
> -H Print the name of header files as they are
> used\n\
> -C Do not discard comments\n\
> +"), stdout);
> + fputs (_("\
> -dM Display a list of macro definitions active at
> end\n\
> -dD Preserve macro definitions in output\n\
> -dN As -dD except that only the names are
> preserved\n\
> @@ -1764,6 +1814,8 @@ Switches:\n\
> -ftabstop=<number> Distance between tab stops for column
> reporting\n\
> -P Do not generate #line directives\n\
> -$ Do not allow '$' in identifiers\n\
> +"), stdout);
> + fputs (_("\
> -remap Remap file names when including files.\n\
> --version Display version information\n\
> -h or --help Display this information\n\