Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #14923

Re: warning: string length greater than '509'

From Robert Wessel <robertwessel2@yahoo.com>
Newsgroups comp.lang.c
Subject Re: warning: string length greater than '509'
Message-ID <a3h9f7ds78m1vuaj2o732l2s5u9klus0fr@4ax.com> (permalink)
References <jd1jij$m7g$1@reader1.panix.com> <qmn8f7hfvorini9ba4qdjld0h3p6tkag99@4ax.com> <jd1stq$nhj$1@reader1.panix.com>
Organization Forte Inc. http://www.forteinc.com/apn/
Date 2011-12-23 12:27 -0600

Show all headers | View raw


On Fri, 23 Dec 2011 12:41:30 +0000 (UTC), JohnF
<john@please.see.sig.for.email.com> wrote:

>Robert Wessel <robertwessel2@yahoo.com> wrote:
>> JohnF <john@please.see.sig.for.email.com> wrote:
>> 
>>>  warning: string length '1008' is greater than the
>>>  length '509' ISO C90 compilers are required to support
>> 
>> Compile with: -Wno-overlength-strings
>
>Who knew??? So I took a look at  man cc  and also found
>-std=gnu99 which also works. Weirdly, though, -std=c99,
>which seems equivalent as described on the manpage,
>emits about a dozen new warnings, including some
>"obviously wrong" (meaning they could be right?) ones
>like "implicit declaration of function 'popen'", even
>though stdio.h is included. (Note: I haven't actually
>tested the executable images created using either switch,
>and certainly not looked for any differences in the
>generated instructions.)


As others have pointed out, gnu99 leaves a bunch of commonly used GCC
extensions enabled.

A word about C99 mode (with or without extensions), though.  If C99
support is a reasonable prerequisite for the targets you're intending
to port to (or if you're writing strictly for the local machine), by
all means, go ahead and use that, there are certainly some useful
additions to the language (and also a few changes).

But while C89/C90 has been officially superseded by C99 (or actually
C11 as of a couple of weeks ago), there are a significant number of
compilers in the world that have not fully implemented C99 (or any of
C99) while still providing a full C89 implementation.  MS's standard
compiler falls into that category, for example, as do many compilers
for embedded targets.

So if you intend a port to Windows, you'll have to use a compiler
other than MSVC if you use C99 features.  If I understand the
situation correctly, Jacob Navia, who has posted in this thread, has
produced such a creature, and would apparently be willing to sell you
a license.  The GCC ports for Windows should work too, as would
Intel's ICC.  But there are certainly some advantages to using MSVC
for Windows development.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-23 10:01 +0000
  Re: warning: string length greater than '509' jacob navia <jacob@spamsink.net> - 2011-12-23 11:19 +0100
  Re: warning: string length greater than '509' pete <pfiland@mindspring.com> - 2011-12-23 05:49 -0500
    Re: warning: string length greater than '509' jacob navia <jacob@spamsink.net> - 2011-12-23 13:52 +0100
      Re: warning: string length greater than '509' Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-28 03:27 -0800
        Re: warning: string length greater than '509' James Kuyper <jameskuyper@verizon.net> - 2011-12-28 08:16 -0500
        Re: warning: string length greater than '509' Keith Thompson <kst-u@mib.org> - 2011-12-28 13:04 -0800
          Re: warning: string length greater than '509' Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-25 16:47 -0800
    Re: warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-23 13:04 +0000
      Re: warning: string length greater than '509' Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-23 09:36 -0500
  Re: warning: string length greater than '509' Robert Wessel <robertwessel2@yahoo.com> - 2011-12-23 04:59 -0600
    Re: warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-23 12:41 +0000
      Re: warning: string length greater than '509' jt@toerring.de (Jens Thoms Toerring) - 2011-12-23 13:50 +0000
      Re: warning: string length greater than '509' James Kuyper <jameskuyper@verizon.net> - 2011-12-23 09:14 -0500
      Re: warning: string length greater than '509' Robert Wessel <robertwessel2@yahoo.com> - 2011-12-23 12:27 -0600
        Re: warning: string length greater than '509' Seebs <usenet-nospam@seebs.net> - 2011-12-23 19:04 +0000
          Re: warning: string length greater than '509' Robert Wessel <robertwessel2@yahoo.com> - 2011-12-23 16:11 -0600
        New C standard (was Re: warning: string length greater than '509') Keith Thompson <kst-u@mib.org> - 2011-12-23 12:21 -0800
          Re: New C standard (was Re: warning: string length greater than '509') Jens Gustedt <jens.gustedt@loria.fr> - 2011-12-23 22:54 +0100
          Re: New C standard (was Re: warning: string length greater than '509') Robert Wessel <robertwessel2@yahoo.com> - 2011-12-23 16:27 -0600
          Re: New C standard (was Re: warning: string length greater than '509') rudolf <r.thered@gmail.com> - 2011-12-23 15:36 -0800
          new edition of Harbison and Steele? Patrick Scheible <kkt@zipcon.net> - 2011-12-26 18:57 -0800
            Re: new edition of Harbison and Steele? Keith Thompson <kst-u@mib.org> - 2011-12-27 02:48 -0800
              Re: new edition of Harbison and Steele? Patrick Scheible <kkt@zipcon.net> - 2011-12-27 11:45 -0800
        Re: warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-24 05:42 +0000
          Re: warning: string length greater than '509' Robert Wessel <robertwessel2@yahoo.com> - 2011-12-24 00:47 -0600
            Re: warning: string length greater than '509' JohnF <john@please.see.sig.for.email.com> - 2011-12-24 08:51 +0000
  Re: warning: string length greater than '509' Stars and Midnight China Blue <chine.bleu@yahoo.com> - 2011-12-23 03:34 -0800
  Re: warning: string length greater than '509' Kaz Kylheku <kaz@kylheku.com> - 2011-12-23 16:48 +0000

csiph-web