On Wed, 22 Jun 2005, Joe Buck wrote: > The reason for this (making the g++ script compile .c files as C++) is > historical; in the early days Stroustrup used the .c extension for C++ as > well, apparently because he had ambitions of displacing C with C++, so > in the early days that's what users expected.
Thanks for this piece of background information, Joe! What bothered me most is the asymmetry between gcc compiling a .cc file as C++ (this I had expected) and g++ compiling a .c file as C++ (this I had not). On Wed, 22 Jun 2005, Gabriel Dos Reis wrote: > It must be a bug. If it process them as a C++ files, it must compile > them as C++. Similarly, if gcc preprocess files as C files, one would > expect it to compile it as C programs with appropriate semantics. It seems I made a mistake in one of my original tests. With current GCC head I'm no longer to reproduce this. Gerald