[#7708] Bug in libsnmp-ruby1.8 — Hadmut Danisch <hadmut@...>

Hi,

8 messages 2006/04/11
[#7709] Re: Bug in libsnmp-ruby1.8 — Eric Hodel <drbrain@...7.net> 2006/04/11

On Apr 11, 2006, at 6:23 AM, Hadmut Danisch wrote:

[#7770] Re: possible defect in array.c — "Brown, Warren" <warrenbrown@...>

> rb_range_beg_len (in range.c) does set beg and len.

13 messages 2006/04/26
[#7771] Re: possible defect in array.c — "Pat Eyler" <rubypate@...> 2006/04/26

On 4/26/06, Brown, Warren <warrenbrown@aquire.com> wrote:

Re: possible defect in array.c

From: Sam Roberts <sroberts@...>
Date: 2006-04-27 01:33:32 UTC
List: ruby-core #7782
On Thu, Apr 27, 2006 at 09:41:00AM +0900, Nobuyoshi Nakada wrote:
> From: Nobuyoshi Nakada <nobu@ruby-lang.org>
> To: ruby-core@ruby-lang.org
> Subject: Re: possible defect in array.c
> Date: Thu, 27 Apr 2006 09:41:00 +0900
> 
> Hi,
> 
> 2006/4/27, Sam Roberts <sroberts@uniserve.com>:
> > By default, gcc implements an extended C dialect. It supports many
> > things that are not standard C. It lists these extensions in its docs.
> 
> Not a dialect.  It's defaulted to C99 now in gcc 4.

Are you sure? It appears to support non-standard extensions in both C99
and C89 dialects. I'm not complaining, the extensions are useful, but
just because gcc compiled it doesn't mean its standard C, of any
particular dialect.

Interleaved definitions and statements in explicit C89 mode:

sroberts@pebble:/tmp% gcc -c --std=c89 __.c
sroberts@pebble:/tmp% cat __.c

int foo(int i)
{
        int a;
        a = 0;
        int b;
        return i + a + b;
}


Ranges in case statements aren't C99, to my knowledge, and are supported in
both modes, as well as default:

sroberts@pebble:/tmp% cat __.c

int foo(int i)
{
        switch(i)
        {
                case 1 ... 4:
                  return 1;
        }
}

sroberts@pebble:/tmp% gcc -c __.c
sroberts@pebble:/tmp% gcc -c --std=c99 __.c
sroberts@pebble:/tmp% gcc -c --std=c89 __.c

sroberts@pebble:/tmp% gcc --version
gcc (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)

Sam



In This Thread