[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1378: weird ELF/a.out difference



> Package: elf-libc
> Version: 5.2.7-1
>
> Package: elf-gcc
> Version: 2.7.0-2
>
> Consider the following program:
> -- demo.c --
> #include <limits.h>
>
> int main(void) {
>   if (3 > SHRT_MAX) {
>     exit(1);
>   }
> }
> -- end --
>
> when this program is compiled for a.out (gcc-2.6.3-4, libc-4.6.27-5)
> using "gcc test.c" or "gcc -I/usr/include test.c" all goes well;
> when it is compiled for ELF (in an environment with /usr/elf before
> /usr/bin in the PATH and /usr/elf/gcc -> /usr/bin/gcc-elf etc)
> it compiles fine using "gcc test.c", but
> "gcc -I/usr/i486-linuxelf/include test.c" results in:
> --
> test.c: In function `main':
> test.c:4: `SHRT_MAX' undeclared (first use this function)
> test.c:4: (Each undeclared identifier is reported only once
> test.c:4: for each function it appears in.)
> --
>
> I'm not sure whether this is actually a bug or not, I just think it
> is a strange difference between a.out or ELF.
>
> /usr/include/limits.h differs from /usr/i486-linuxelf/limits.h only
> in that it has some extra #ifdef'ed code for __SVR4__I386_ABI_L1__.
> The posix1_lim.h and posix2_lim.h files are identical for a.out and ELF.

I've reassigned this bug to libc as the problem also exists there when
run with "gcc -I/usr/include -I/usr/include" and that the elf-*
packages will possibly be going away before this gets fixed.

David
--
David Engel                        Optical Data Systems, Inc.
david@ods.com                      1101 E. Arapaho Road
(214) 234-6400                     Richardson, TX  75081


Reply to: