On Fri, 2024-08-23 at 16:56 -0500, Andrew Pennebaker via austin-group-l at The Open Group wrote: > Given the popularity of the higher level C++ language, I think it > would be useful to declare similar implicit default rules for C++ > project files.
Unfortunately C++ is not standardized. Not even the filename extension is standardized: some projects use .cc, some use .cpp, some use .cxx, some use .c++, and some use .C (capital C) which is obviously bad since the filesystem might be case-insensitive, but I've seen it done. There are likely others. This makes it difficult to write a default rule to compile C++ source files and I'm not excited about creating separate rules for all the above extensions. > As of POSIX 2024, make defaults the C standard version to C17. Simply > for parity, propose declaring the default C++ standard version as > C++17. > > The default C++ compiler program name would be "c++". There is already a default variable CXX in GNU Make holding the name of the C++ compiler, and has been for 32 years. So we don't need to worry about that. If you're asking that the CXX variable be defined in POSIX, you'll have to ask the committee about that. -- Paul D. Smith <psm...@gnu.org> Find some GNU Make tips at: https://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist