[Bug pch/20315] pch problems on solaris
cmarco at indra dot es
gcc-bugzilla@gcc.gnu.org
Thu Mar 17 08:56:00 GMT 2005
------- Additional Comments From cmarco at indra dot es 2005-03-17 08:55 -------
(In reply to comment #2)
> Confirmed, but the question is why do you need to generate the PCH twice?
> Header files never produce object files, unlike in Ada. Also removing the
PCH
> file is enough to solve the problem.
Perhahs, I have a concept problem. If you have a c++ template in a ".h"
file without a ".c" file and you compile it you should obtain a .o object. I
do not need any Â.gch file
So this happens with the 3.2.3 version.
sun1:~/test> g++ -v
Reading specs from /usr/local/gcc-3.2.3/bin/../lib/gcc-lib/sparc-sun-
solaris2.9/3.2.3/specs
Configured with: ./configure --prefix=/usr/users/afernand/comp/gcc-3.2.3 -
enable-language=c,c++
Thread model: posix
gcc version 3.2.3
sun1:~/test> ls -la test*
-rw-r----- 1 cmarco indra 141 Mar 3 16:49 test.h
sun1:~/test> g++ -m64 -x c++ -c test.h
sun1:~/test> ls -la test*
-rw-r----- 1 cmarco indra 141 Mar 3 16:49 test.h
-rw-r----- 1 cmarco indra 672 Mar 17 09:18 test.o
Now if I use the 3.4.4 version:
sun1:~/test> g++ -v
Reading specs from /usr/local/gcc-34/bin/../lib/gcc/sparc-sun-
solaris2.9/3.4.4/specs
Configured with: ./configure --prefix=/usr/users/afernand/comp/gcc-bootstrap-
34 --enable-language=c --without-headers --disable-shared :
(reconfigured) ./configure --prefix=/usr/users/afernand/comp/gcc-bootstrap-34 -
-enable-language=c --without-headers --disable-shared :
(reconfigured) ./configure --prefix=/usr/users/afernand/comp/gcc-bootstrap-34 -
-enable-language=c --without-headers --disable-shared :
(reconfigured) ./configure --prefix=/usr/users/afernand/comp/gcc-34 --enable-
language=c,c++
Thread model: posix
gcc version 3.4.4 20041222 (prerelease)
sun1:~/test> ls -la test*
-rw-r----- 1 cmarco indra 141 Mar 3 16:49 test.h
sun1:~/test> g++ -m64 -x c++ -c test.h
sun1:~/test> ls -la test*
-rw-r----- 1 cmarco indra 141 Mar 3 16:49 test.h
-rw-r----- 1 cmarco indra 1034879 Mar 17 09:23 test.h.gch
Something have change. ¿Should I have use other options?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20315
More information about the Gcc-bugs
mailing list