[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile .c files as C++?

From: Thomas Jahns
Subject: Re: compile .c files as C++?
Date: Thu, 25 Jan 2018 12:59:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/25/18 04:07, Jay K wrote:
I have a bunch of C.
I want to move to C++.
I'm using automake.
I don't want to rename any files.

that's unwise and not going to serve you well in the long run. I very much advise against not renaming files converted from C to C++. While it can be done, this is very likely to lead to a fragile setup that's gonna encounter lots of bugs in edge cases. Don't do this, rename your converted files instead.

If you absolutely have to, consider creating dummy C++ files that #include the corresponding .c file.

C and C++ are sufficiently different languages today that having your tools make the correct assumptions is crucial. Don't trust random debuggers/profilers/IDEs/whatever to figure this out.

Regards, Thomas

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]