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


Groups > comp.lang.c > #14901 > unrolled thread

warning: string length greater than '509'

Started byJohnF <john@please.see.sig.for.email.com>
First post2011-12-23 10:01 +0000
Last post2011-12-23 16:48 +0000
Articles 9 on this page of 29 — 16 participants

Back to article view | Back to comp.lang.c


Contents

  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

Page 2 of 2 — ← Prev page 1 [2]


#14935 — Re: New C standard (was Re: warning: string length greater than '509')

Fromrudolf <r.thered@gmail.com>
Date2011-12-23 15:36 -0800
SubjectRe: New C standard (was Re: warning: string length greater than '509')
Message-ID<r.thered-906EB5.15361223122011@free.teranews.com>
In reply to#14929
In article <lny5u311l0.fsf_-_@nuthaus.mib.org>,
 Keith Thompson <kst-u@mib.org> wrote:

> I presume that no implementations yet support all of C2011.  Are there
> implementations that support some of the new C2011 features?
I would guess so, since the committee tends to standardize things that 
are already implemented. (At least that's how I understand it)

[toc] | [prev] | [next] | [standalone]


#15015 — new edition of Harbison and Steele?

FromPatrick Scheible <kkt@zipcon.net>
Date2011-12-26 18:57 -0800
Subjectnew edition of Harbison and Steele?
Message-ID<86ehvq7md9.fsf_-_@zipcon.net>
In reply to#14929
Keith Thompson <kst-u@mib.org> writes:

> Since the 2011 ISO C standard officially supersedes the C99 standard,

So, is there a new edition of Harbison and Steele in the works?

Thanks,

-- Patrick

[toc] | [prev] | [next] | [standalone]


#15022 — Re: new edition of Harbison and Steele?

FromKeith Thompson <kst-u@mib.org>
Date2011-12-27 02:48 -0800
SubjectRe: new edition of Harbison and Steele?
Message-ID<lnlipy1ea1.fsf@nuthaus.mib.org>
In reply to#15015
Patrick Scheible <kkt@zipcon.net> writes:
> Keith Thompson <kst-u@mib.org> writes:
>> Since the 2011 ISO C standard officially supersedes the C99 standard,
>
> So, is there a new edition of Harbison and Steele in the works?

I have no inside information on that, but the web site
<http://careferencemanual.com/> hasn't been updated since 2006-08-14.

But there is an e-mail address for the author.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
    Will write code for food.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#15037 — Re: new edition of Harbison and Steele?

FromPatrick Scheible <kkt@zipcon.net>
Date2011-12-27 11:45 -0800
SubjectRe: new edition of Harbison and Steele?
Message-ID<8639c5n6h9.fsf@zipcon.net>
In reply to#15022
Keith Thompson <kst-u@mib.org> writes:

> Patrick Scheible <kkt@zipcon.net> writes:
>> Keith Thompson <kst-u@mib.org> writes:
>>> Since the 2011 ISO C standard officially supersedes the C99 standard,
>>
>> So, is there a new edition of Harbison and Steele in the works?
>
> I have no inside information on that, but the web site
> <http://careferencemanual.com/> hasn't been updated since 2006-08-14.
>
> But there is an e-mail address for the author.

If a couple of days goes by and nobody here volunteers an answer, I'll
send him an e-mail.  Thanks!

-- Patrick

[toc] | [prev] | [next] | [standalone]


#14942

FromJohnF <john@please.see.sig.for.email.com>
Date2011-12-24 05:42 +0000
Message-ID<jd3onk$gpu$1@reader1.panix.com>
In reply to#14923
Robert Wessel <robertwessel2@yahoo.com> wrote:
> 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.

Thanks for the additional info. C89 should work fine for everything,
except the silly long string initialization. And although I usually
try to code in completely portable ansi standard C, this particular
program is pretty much Unix only. Maybe I should clarify, it's the
gpl'ed program http://www.forkosh.com/mathtex.html  that recently
got that silly long string due to the enhancement
http://www.forkosh.com/mathtex.html?valignment  which vertically
aligns emitted images precisely ("middle" or "absmiddle" doesn't
usually do a decent job). And since it's a one-line build, I don't
provide any configure/make-type script, just instructions what to
put on the cc line. And I won't bother adding -std to that. But I
occasionally get email about -pedantic warnings from sticklers, and
so try to eliminate them when it's feasible and reasonably easy.
This time it apparently ain't, so the heck with it. The 4095 limit
pointed out by Jacob Navia is quite more than I actually need,
so there's no actual problem, just the pesky message. And I hoped
there might be a tricky way to easily accomplish the equivalent
initialization without raising the warning. But I'm not materially
changing the code just to deal with it.
-- 
John Forkosh  ( mailto:  j@f.com  where j=john and f=forkosh )

[toc] | [prev] | [next] | [standalone]


#14943

FromRobert Wessel <robertwessel2@yahoo.com>
Date2011-12-24 00:47 -0600
Message-ID<q8taf7pf4vdcvtircnqktghq5d6a3e6n5h@4ax.com>
In reply to#14942
On Sat, 24 Dec 2011 05:42:12 +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:
>>> 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.
>
>Thanks for the additional info. C89 should work fine for everything,
>except the silly long string initialization. And although I usually
>try to code in completely portable ansi standard C, this particular
>program is pretty much Unix only. Maybe I should clarify, it's the
>gpl'ed program http://www.forkosh.com/mathtex.html  that recently
>got that silly long string due to the enhancement
>http://www.forkosh.com/mathtex.html?valignment  which vertically
>aligns emitted images precisely ("middle" or "absmiddle" doesn't
>usually do a decent job). And since it's a one-line build, I don't
>provide any configure/make-type script, just instructions what to
>put on the cc line. And I won't bother adding -std to that. But I
>occasionally get email about -pedantic warnings from sticklers, and
>so try to eliminate them when it's feasible and reasonably easy.
>This time it apparently ain't, so the heck with it. The 4095 limit
>pointed out by Jacob Navia is quite more than I actually need,
>so there's no actual problem, just the pesky message. And I hoped
>there might be a tricky way to easily accomplish the equivalent
>initialization without raising the warning. But I'm not materially
>changing the code just to deal with it.


If the command line option is an issue, there's an equivalent #pragma.

[toc] | [prev] | [next] | [standalone]


#14952

FromJohnF <john@please.see.sig.for.email.com>
Date2011-12-24 08:51 +0000
Message-ID<jd43r7$ho3$1@reader1.panix.com>
In reply to#14943
Robert Wessel <robertwessel2@yahoo.com> wrote:
> JohnF <john@please.see.sig.for.email.com> wrote:
>>
>>I usually try to code in completely portable ansi standard C
> 
> If the command line option is an issue, there's an equivalent #pragma.

Yeah, I hate those kinds of constructs, which are nonportable by nature.
I usually try to (functionally) decompose a problem domain into two
subdomains: a computable function part, programmable a la Church's thesis
in any Turing complete language, and an environment/os-specific part
(usually i/o-related, or file/resource handling/locking-related, or
interprocess communication-related, or otherwise concurrency-related, etc).
And I try to minimize and isolate/sandbox the os-part as much as possible,
leaving the "business logic", and as much i/o as possible, completely
portable and reusable.
Anyway, that's getting way off-topic.
Thanks for your help,
-- 
John Forkosh  ( mailto:  j@f.com  where j=john and f=forkosh )

[toc] | [prev] | [next] | [standalone]


#14906

FromStars and Midnight China Blue <chine.bleu@yahoo.com>
Date2011-12-23 03:34 -0800
Message-ID<chine.bleu-2EAD78.03345323122011@news.eternal-september.org>
In reply to#14901
In article <jd1jij$m7g$1@reader1.panix.com>,
 JohnF <john@please.see.sig.for.email.com> wrote:

> I like to compile (linux/gcc) with -pedantic -Wall
> and neaten up the code to eliminate all warnings.
> But the following code emits the message
>   warning: string length '1008' is greater than the
>   length '509' ISO C90 compilers are required to support
> and I can't see a neat way around it. The offending

There's easy way around it: ignore the warning. Don't develop OCD over this.

The other ways are to read it in from a file, or to concatenate a list of 
strings.

-- 
My name Indigo Montoya.      |                       Enya go Bragh.
You flamed my father.        |       I'm whoever you want me to be.
Prepare to be spanked.       |  Annoying Usenet one post at a time.
Stop posting that!           |    At least I can stay in character.

[toc] | [prev] | [next] | [standalone]


#14918

FromKaz Kylheku <kaz@kylheku.com>
Date2011-12-23 16:48 +0000
Message-ID<20111223084746.77@kylheku.com>
In reply to#14901
On 2011-12-23, JohnF <john@please.see.sig.for.email.com> wrote:
> I like to compile (linux/gcc) with -pedantic -Wall
> and neaten up the code to eliminate all warnings.
> But the following code emits the message
>   warning: string length '1008' is greater than the
>   length '509' ISO C90 compilers are required to support
> and I can't see a neat way around it.

Doh, you asked for pedantic and so you got it!

> only solution. But a straightforward way around the
> warning would be even nicer.

Delete "-pedantic" from the compiler command line.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.c


csiph-web