This is the mail archive of the
mailing list for the GCC project.
Re: Changes to gcc.c (display_help)
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Changes to gcc.c (display_help)
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Tue, 27 Jun 2000 12:35:14 -0700
- Cc: meissner at cygnus dot com, pthomas at suse dot de, gcc-patches at gcc dot gnu dot org
- References: <200006271828.OAA25969@caip.rutgers.edu>
On Tue, Jun 27, 2000 at 02:28:10PM -0400, Kaveh R. Ghazi wrote:
> > From: Michael Meissner <firstname.lastname@example.org>
> > On Tue, Jun 27, 2000 at 09:48:09AM +0200, Philipp Thomas wrote:
> > > While I only had intended to mark the help text in display_help
> > > for translation, I ended up modifiying it. First this changes
> > > printf to fputs where possible and secondly tries to output as
> > > much text as possible in one call instead of one printf per
> > > line. Main reason is, that translating the help text is much
> > > easier this way.
> > > OK to commit?
> > No. It would not compile under a strict ISO C compiler, which has strict
> > limits on string length (IIRC, 508 characters).
> Okay, then would this be appropriate?
I'm not convinced this is a useful warning. Compilers are only
*required* to support strings of these lengths, but most compilers do
support much longer strings. cppinit.c has a 4600-character string in
it and no one has reported any trouble.
If we do decide to issue this diagnostic, then you should check the
value in C89. Also, the limit was raised to 4095 in C99, so you need
to make the limit conditional on -std=<whatever>.