GNU bug report logs -
#7099
mbsalign.c old c compiler complains about variables defined inside code
Previous Next
Reported by: Suhan Andrei <sandi_ro <at> yahoo.com>
Date: Fri, 24 Sep 2010 20:31:01 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7099 in the body.
You can then email your comments to 7099 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#7099
; Package
coreutils
.
(Fri, 24 Sep 2010 20:31:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Suhan Andrei <sandi_ro <at> yahoo.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Fri, 24 Sep 2010 20:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi
Just wanted to let you know there are some errors when using old compiler
(
gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
)
Tere are 2 variables defined inside blocks of code that triggers old c compiler
to spill errors.
I used code from coreutils-8.5.tar.gz
I moved declaration at the start of code and all compiled ok.
Andrei.
[Message part 2 (text/html, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#7099
; Package
coreutils
.
(Fri, 24 Sep 2010 21:33:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 7099 <at> debbugs.gnu.org (full text, mbox):
On 09/24/10 13:15, Suhan Andrei wrote:
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
That compiler was shipped with Red Hat Linux 6.0, if I
read the history correctly, and Red Hat stopped supporting
that version years ago. Our general rule of thumb is that
we don't bother supporting software that the original supplier
no longer supports.
Is another, more up-to-date compiler available on that old
installation? That might be the easiest way to get going.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#7099
; Package
coreutils
.
(Fri, 24 Sep 2010 21:37:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 7099 <at> debbugs.gnu.org (full text, mbox):
On 24/09/10 21:15, Suhan Andrei wrote:
> Hi
>
> Just wanted to let you know there are some errors when using old compiler
> (
> gcc -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
> )
>
>
> Tere are 2 variables defined inside blocks of code that triggers old c compiler
> to spill errors.
> I used code from coreutils-8.5.tar.gz
> I moved declaration at the start of code and all compiled ok.
Eep, I'll fix that up, as we want to keep stuff under gl/
C89 conformant, as it may be moved to gnulib at some stage.
$ LANG=C gcc -std=c89 -pedantic -Werror -c git/coreutils/gl/lib/mbsalign.c -o /dev/null -I git/coreutils/lib/
cc1: warnings being treated as errors
In file included from git/coreutils/gl/lib/mbsalign.c:21:
git/coreutils/gl/lib/mbsalign.h:24: error: comma at end of enumerator list
git/coreutils/gl/lib/mbsalign.c: In function 'mbsalign':
git/coreutils/gl/lib/mbsalign.c:241: error: ISO C90 forbids mixed declarations and code
git/coreutils/gl/lib/mbsalign.c: In function 'ambsalign':
git/coreutils/gl/lib/mbsalign.c:269: error: ISO C90 forbids mixed declarations and code
However I'm confused about how this was the only failure
given this info from README:
***********************
Pre-C99 build failure
-----------------------
There is a new, implicit build requirement:
To build the coreutils from source, you should have a C99-conforming
compiler, due to the use of declarations after non-declaration statements
in several files in src/. There is code in configure to find and, if
possible, enable an appropriate compiler. However, if configure doesn't
find a C99 compiler, it continues nonetheless, and your build will fail.
If that happens, simply[*] apply the included patch using the following
command, and then run make again:
cd src && patch < c99-to-c89.diff
[*] however, as of coreutils-7.1, the "c99-to-c89.diff" file is no longer
maintained, so even if the patches still apply, the result will be an
incomplete conversion. It's been 10 years. Get a decent compiler! ;-)
cheers,
Pádraig.
Reply sent
to
Pádraig Brady <P <at> draigBrady.com>
:
You have taken responsibility.
(Fri, 01 Oct 2010 13:31:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Suhan Andrei <sandi_ro <at> yahoo.com>
:
bug acknowledged by developer.
(Fri, 01 Oct 2010 13:31:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 7099-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 24/09/10 22:38, Pádraig Brady wrote:
> On 24/09/10 21:15, Suhan Andrei wrote:
>> Hi
>>
>> Just wanted to let you know there are some errors when using old compiler
>> (
>> gcc -v
>> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
>> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>> )
>>
>>
>> Tere are 2 variables defined inside blocks of code that triggers old c compiler
>> to spill errors.
>> I used code from coreutils-8.5.tar.gz
>> I moved declaration at the start of code and all compiled ok.
>
> Eep, I'll fix that up, as we want to keep stuff under gl/
> C89 conformant, as it may be moved to gnulib at some stage.
I'll push the attached soon.
cheers,
Pádraig.
[mbsalign-c89.diff (text/x-patch, attachment)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 30 Oct 2010 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.