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. Is it possible to disable C++ "Semantic Issue" warnings when working on a C project?
QtWS25 Last Chance

Is it possible to disable C++ "Semantic Issue" warnings when working on a C project?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 3 Posters 12.8k 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.
  • S Offline
    S Offline
    shvelven
    wrote on last edited by
    #1

    I'm in a CompSci 1 class and we're using C. Consequently, I get a lot of warnings about things that are depreciated or bad practice in C++, but perfectly legal in C and it's pretty annoying. I'm compiling .c files with clang and I don't get any compiler warnings—I'm referring only to the little yellow warning symbols next to the line numbers:

    Is it possible to turn these off?

    kshegunovK 1 Reply Last reply
    0
    • S shvelven

      I'm in a CompSci 1 class and we're using C. Consequently, I get a lot of warnings about things that are depreciated or bad practice in C++, but perfectly legal in C and it's pretty annoying. I'm compiling .c files with clang and I don't get any compiler warnings—I'm referring only to the little yellow warning symbols next to the line numbers:

      Is it possible to turn these off?

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      Hi,
      I don't get those with QtCreator 4.1 with the old code parsing. Are you by any chance using the clang code model? If so you should try tweaking the configuration. Look up Tools > Options > C++ > Code model
      Code model dialog

      Kind regards.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      2
      • S Offline
        S Offline
        shvelven
        wrote on last edited by
        #3

        Thank you. Adding a custom entry with "-std=c99 -Weverything" does exactly what I wanted.

        For any future readers, the complete set of options is here.

        _ 1 Reply Last reply
        4
        • S shvelven

          Thank you. Adding a custom entry with "-std=c99 -Weverything" does exactly what I wanted.

          For any future readers, the complete set of options is here.

          _ Offline
          _ Offline
          ___Jan___
          wrote on last edited by
          #4

          @shvelven Add this entry where in QTCreator please?

          kshegunovK 1 Reply Last reply
          0
          • _ ___Jan___

            @shvelven Add this entry where in QTCreator please?

            kshegunovK Offline
            kshegunovK Offline
            kshegunov
            Moderators
            wrote on last edited by
            #5

            @kshegunov said in Is it possible to disable C++ "Semantic Issue" warnings when working on a C project?:

            Look up Tools > Options > C++ > Code model

            Read and abide by the Qt Code of Conduct

            1 Reply Last reply
            2

            • Login

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