Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to specify C/C++ standard to Clang Code Model in imported project?
Forum Updated to NodeBB v4.3 + New Features

How to specify C/C++ standard to Clang Code Model in imported project?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 601 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    flashmozzg
    wrote on last edited by
    #1

    Hello, I'm trying to work on some Makefile project that heavily relies on GNU-isms, so by default, new clang code model spews a lot of warnings/errors because some custom types are not defined or not valid in ISO C, while they are fine with -std=gnu99. Is there a way to specify it somewhere?

    It loks like there was a way before QtC 4.5 according to https://stackoverflow.com/a/38323763/4114447 (coincedentally it was also the first thing I tried on my own), but it was since removed (IMHO, wrongly).

    If there is no such way, then it's definitely a bug as flags such as -std can heavily influence the errors/warnings and general usability of code model.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      flashmozzg
      wrote on last edited by
      #2

      Any help? I've only found some options specific to certain standard compatibility, but that doesn't impact how the code is parsed.

      aha_1980A 1 Reply Last reply
      0
      • F flashmozzg

        Any help? I've only found some options specific to certain standard compatibility, but that doesn't impact how the code is parsed.

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @flashmozzg

        The most relevant bug for that is QTCREATORBUG-20613, but it seems you already found that one.

        Qt has to stay free or it will die.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved