Invoke g++ with source.c

Jonathan Wakely jwakely.gcc@gmail.com
Mon Mar 13 16:35:00 GMT 2017


On 13 March 2017 at 16:20, ryxi@stu.xidian.edu.cn wrote:
> Hi,
>
> man 1 g++ said "file.c" is considered unpreprocessed C source file. But in fact g++ would compile it as C++ source. Why does g++ behave this way? Should we make it clear in g++ doc?

It's documented at https://gcc.gnu.org/onlinedocs/gcc/Invoking-G_002b_002b.html



More information about the Gcc-help mailing list