Announcement

Collapse
No announcement yet.

GCC Unlikely To Adopt A "-Weverything" For Exposing All Possible Code Warnings

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • GCC Unlikely To Adopt A "-Weverything" For Exposing All Possible Code Warnings

    Phoronix: GCC Unlikely To Adopt A "-Weverything" For Exposing All Possible Code Warnings

    While the LLVM Clang compiler has a -Weverything switch to enable every possible warning, it's unlikely the GNU Compiler Collection will offer a similar option...

    http://www.phoronix.com/scan.php?pag...ly-Weverything

  • #2
    Aww come on, change it to -Weverything and -Werror... by default heheh

    (-Werror=everything lol)
    Last edited by Grogan; 01-23-2019, 06:16 PM.

    Comment


    • #3
      I can't say I'm surprised, but man this is some real shitty usability. One would expect -Wall to have all relevant warnings for the platform, but unfortunately that's not the case. I don't know about bleeding edge GCC, but the one used at work needs -Wcast-align specifically set to expose alignment issues in the code. Worst yet, this bug report tells you how little they care about the issue. Say what you want about packed structs, but in C they are sadly quite required in some context and this is a fairly easy pit to fall into. Yet, it takes about 7-8 years to implement it. I'll leave it up to the reader to determine the GCC developers attitude about this.

      Regardless, it's sad that this kind of stubborn attitude exists. In my case I simply have to enable alignment fault error on the ARM chip and find all the misaligned read and writes in runtime. It's a fairly shit approach as a result of the lack of option to make the compiler report all warnings it knows about. Why is it so damn hard to just allow everything to be exposed if the person compiling wants it?!

      Comment


      • #4
        Not surprising. Someone I know submitted -Wmost to make GNU gcc compatible with Apple's GCC and clang and it was rejected.

        Comment


        • #5
          iirc, some of the warnings are known to have false positives. You don't necessarily want to turn them all on without understanding this point. It will result in a lot of noise and bug reports about already known deficiencies.

          Comment


          • #6
            What a bunch of idiots! There is good reason to want to throw all warnings. Beyond that who cares what some developers need, like most compiler switches they get turned on or off based on project needs.

            Setiously it is no wonder CLang continues to see new adoption.

            Comment


            • #7
              What is the full parameters list to get a result similar to -Weverything?

              -Wall -Wabc -Wetc... ?

              Comment


              • #8
                Originally posted by wizard69 View Post
                What a bunch of idiots! There is good reason to want to throw all warnings. Beyond that who cares what some developers need, like most compiler switches they get turned on or off based on project needs.

                Setiously it is no wonder CLang continues to see new adoption.
                From the discussion on the gcc mailing list:

                Every LLVM dev I've spoken to thinks their -Weverything was a mistake
                and hates it. It was meant to be for option discovery by automated
                tools, but users started using it.

                Comment


                • #9
                  Originally posted by andrei_me View Post
                  What is the full parameters list to get a result similar to -Weverything?

                  -Wall -Wabc -Wetc... ?
                  I use -Wall -Wextra, and sometimes that seems like too much -- you almost have to use -Wno-unused-parameter with anything that uses callback functions.

                  Comment


                  • #10
                    I cannot forsee myself ever using this... does anyone that actually maintains a non-trivial piece of software want this?

                    Comment

                    Working...
                    X