4

When /W4 in Visual Studio (cl) shows more (and more helpful) information than /Wall /Wextra /pedantic in gcc (MinGW)....

I was not expecting that....

Comments
  • 0
    Which version of gcc? I seriously doubt that 😂
  • 0
  • 0
    @blockchaintacos I'm a happy user of GCC8, what is the warning in question? Just curious :)
  • 0
    @Charon92 please clarify — I am not aware of the proper rules of meme use, but interested in learning more.
  • 0
    @7Raiden so I’m developing an introductory hands-on course on C for (primarily Python) developers in my org. I’m taking a heuristic approach that gets their hands on the keyboard in the first 5 minutes and all throughout, and during a simplistic introduction to variable declaration and assignment, I (intentionally) assign a floating point value to an int to reinforce that int’s are whole numbers. cl warned about the narrowing conversion (double to int) whereas gcc didn’t complain at all.
  • 2
    @blockchaintacos well, you need to enable the specific warning for that :) it's unintuitive that -Wall is not actually *every* warning! And -Wextra and -Wpedantic do not give them all either! On Github you find an exhaustive list of all possible warning!

    Otherwise use clang, with - Weverything! But CL is far from being a compiler as good as gcc and clang!
  • 1
    @7Raiden I learned something new today!
  • 0
    @7Raiden and I’ll update the tutorial lest they get the wrong impression of gcc
  • 2
    @blockchaintacos yes exactly :) I tend to say that clang it's a very good compiler, but I still use gcc for performance!
Add Comment