[gnu.g++.bug] g++-1.36.0 file suffix handling

dwf%hope@LANL.GOV (David W. Forslund) (10/04/89)

I've noticed that g++-1.36.0- uses the file suffix to decide whether
to treat the code as C code or C++ code.  I don't think this is a
proper way to decide how to interpret a file.  I think that C++ code
should be allowed to have .c as suffixes as specified in C++ 2.0.
This certainly was very confusing to me when I was trying to get some
code working under g++ that was running fine under C++ 2.0.

David Forslund
MS E531
Los Alamos National Laboratory
Los Alamos, NM 87545

(505) 665-1907
(dwf@lanl.gov)

grunwald@foobar.colorado.edu (Dirk Grunwald) (10/04/89)

I concur, I think that different actions should be taken in gcc is
invoked at g++ -- in particular, I think that -lg++ should be default,
or that *some* library be the default. Using the simple trying of
building a sh-file holding 

#!/bin/sh
exec gcc $* -lg++

generates annoying error messages about -lg++ being ignored because linking
isn't being done. Anything more complex indicates a need for a different
g++/gcc. Also, it would mean that collect users wouldn't need to run collect
on C programs, only C++ programs. All this behavior could be conditional
on the name in argv[0] - no need to have two programs.

Dirk Grunwald -- Univ. of Colorado at Boulder	(grunwald@foobar.colorado.edu)