Menu

Two issues with compiler --std= values

2024-11-17
2024-12-04
  • Andrew C Aitchison

    I note two issues with compiler -std= values in the dmake tool:

    1. "clang++" contains "g++", so with the test for g++ before the test for clang++, CXXFLAGS includes the gnu options when using clang++ - patch attached.

    2. Here, -std is set to gnu++0x or c++0x (not even c++03) but elsewhere in the same file we use -std=c++11 (but not gnu++11 !). If we set std at all, should we not be consistent about which version ?

     
  • Andrew C Aitchison

    That doesn't read right. As is clang++ gets the g++ options.
    The attached patch gives clang++ the correct options.

    But why are we forcing a decades old standard and not even using the correct name ?

     
  • Oliver Stöneberg

    Thanks for reporting this.

    It just has always been inconsistent. And we were using the legacy aliases because we were (unnecessarily) supporting some ancient compilers for quite a while.

    I filed https://trac.cppcheck.net/ticket/13375 about it.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.