[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #1107: Compiling with OpenBSD's gcc-4.2.1 produce
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #1107: Compiling with OpenBSD's gcc-4.2.1 produces 2 warnings when compiling posixunix.c |
Date: |
Sun, 11 May 2014 13:16:12 -0000 |
#1107: Compiling with OpenBSD's gcc-4.2.1 produces 2 warnings when compiling
posixunix.c
-----------------------------+----------------------------------------------
Reporter: ckeen | Owner:
Type: defect | Status: new
Priority: critical | Milestone: 4.9.0
Component: core libraries | Version: 4.8.x
Resolution: | Keywords:
-----------------------------+----------------------------------------------
Old description:
> The line numers differ from building the latest dev snapshot and master
> but the source code line is the same:
>
> {{{
> posixunix.c:9214: warning: array size (4) smaller than bound length
> (1024)
> }}}
>
> The line in question contains:
>
> {{{
> t3=C_curdir(t2);
> }}}
>
> The second warning is generated for the line:
>
> {{{
> t2= C_do_readlink(t1,((C_word*)t0)[2]);
> }}}
>
> Compiling with a newer gcc (4.8.2) from ports does not show these, so
> this might be a compiler optimisation bug in gcc or a bogus warning.
>
> Compiling with -O0 still produced the warnings.
>
> This has been observed on a 32-bit i386 Openbsd 5.5-current machine.
New description:
The line numers differ from building the latest dev snapshot and master
but the source code line is the same:
{{{
posixunix.c:9214: warning: array size (4) smaller than bound length (1024)
}}}
The line in question contains:
{{{
t3=C_curdir(t2);
}}}
The second warning is generated for the line:
{{{
t2= C_do_readlink(t1,((C_word*)t0)[2]);
}}}
Compiling with a newer gcc (4.8.2) from ports does not show these, so this
might be a compiler optimisation bug in gcc or a bogus warning.
Compiling with -O0 still produced the warnings.
This has been observed on a 32-bit i386 Openbsd 5.5-current machine.
--
Comment(by sjamaan):
This seems to be due to #778. For some reason gcc doesn't define the
standard that's being used (perhaps we should add --std=c99 just in case?
But then it would break on platforms that have an older gcc)
--
Ticket URL: <http://bugs.call-cc.org/ticket/1107#comment:1>
CHICKEN Scheme <http://www.call-with-current-continuation.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
- Re: [Chicken-janitors] #1107: Compiling with OpenBSD's gcc-4.2.1 produces 2 warnings when compiling posixunix.c,
Chicken Trac <=