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

Bug#476152: gcc-4.3 behaviour depends on name it was called with



Package: gcc-4.3
Version: 4.3.0-3
Severity: important


While trying to reproduce #476002 I found that gcc-4.3 behaviour depends
on name under which gcc-4.3 was called. I tried to simply set
CC=gcc-4.3, but this doesn't made the pdksh's bug reproducible. I was
able to reproduce it after creating some wrapper script that sets PATH
and executes gcc-4.3. I consider this as very misleading behaviour.

Some examples:

If gcc-4.3 was run as gcc-4.3 or gcc, it is able to compile alloc.c
file:

  $ bash -c 'exec -a gcc gcc-4.3 -c  -DHAVE_CONFIG_H -I. -I. -Wall -g -DDEBIAN -D_FILE_OFFSET_BITS=64 -O2 alloc.c'
  $ bash -c 'exec -a gcc-4.3 gcc-4.3 -c  -DHAVE_CONFIG_H -I. -I. -Wall -g -DDEBIAN -D_FILE_OFFSET_BITS=64 -O2 alloc.c'
  

However if I run gcc-4.3 with any other name passed as argv[0], it fails
to compile it:

  $ bash -c 'exec -a ./gcc gcc-4.3 -c  -DHAVE_CONFIG_H -I. -I. -Wall -g -DDEBIAN -D_FILE_OFFSET_BITS=64 -O2 alloc.c' 2>&1 | tail -n 2
  alloc.c:875: warning: return makes pointer from integer without a cast
  alloc.c:881: error: too many arguments to function 'realloc
  
  $ bash -c 'exec -a anything_else gcc-4.3 -c  -DHAVE_CONFIG_H -I. -I. -Wall -g -DDEBIAN -D_FILE_OFFSET_BITS=64 -O2 alloc.c' 2>&1 | tail -n 2
  alloc.c:875: warning: return makes pointer from integer without a cast
  alloc.c:881: error: too many arguments to function 'realloc'

Also it fails if I change the PATH:

  $ export PATH=.:$PATH
  $ bash -c 'exec -a gcc gcc-4.3 -c  -DHAVE_CONFIG_H -I. -I. -Wall -g > -DDEBIAN -D_FILE_OFFSET_BITS=64 -O2 alloc.c' 2>&1 | tail -n 2
  alloc.c:875: warning: return makes pointer from integer without a cast
  alloc.c:881: error: too many arguments to function 'realloc'


Regards,
robert

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/bash

Versions of packages gcc-4.3 depends on:
ii  binutils            2.18.1~cvs20080103-4 The GNU assembler, linker and bina
ii  cpp-4.3             4.3.0-3              The GNU C preprocessor
ii  gcc-4.3-base        4.3.0-3              The GNU Compiler Collection (base 
ii  libc6               2.7-10               GNU C Library: Shared libraries
ii  libgcc1             1:4.3.0-3            GCC support library
ii  libgomp1            4.3.0-3              GCC OpenMP (GOMP) support library

Versions of packages gcc-4.3 recommends:
ii  libc6-dev                     2.7-10     GNU C Library: Development Librari

-- no debconf information



Reply to: