> is this reproducible with gcc-4.4/gcc-snapshot from karmic and lucid?

Yes (for 4.4.1 anyways):

$ g++ --version
g++ (Ubuntu 4.4.1-4ubuntu8) 4.4.1

$ cat > pch.h
#include <cmath>

$ g++ -c -x c++ -MT pch.h.gch -MD -MP -MF pch.h.dep -o pch.h.gch -O3
-fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -W -Wall
-Werror -Wstrict-aliasing=2 -msse2 pch.h

$ file pch.h.gch
pch.h.gch: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped


The problem seems to be the -x switch:

$ g++ -c -x c++ -o pch.h.gch  pch.h
$ file pch.h.gch
pch.h.gch: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

$ g++ -c  -o pch.h.gch  pch.h
$ file pch.h.gch
pch.h.gch: GCC precompiled header (version 013) for C++


  -x <language>            Specify the language of the following input files
                           Permissible languages include: c c++ assembler none
                           'none' means revert to the default behavior of
                           guessing the language based on the file's extension

-- 
g++ does not produce valid precompiled headers
https://bugs.launchpad.net/bugs/394940
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to