In GCC, when the -Wall -Wextra flags are enabled, you have the option to disable warnings, such as: -Wno-ignored-qualifiers :
warning: 'const' type qualifier on return type has no effect
Is there a way to achieve the same behavior with LLVM / Clang? I looked through it, but found only some corrections-related pages on how this error message feature was added. Nothing on how to disable it.
I use LLVM and Clang version 3.0 (build from SVN sources).
Note. I'm going to post this on SuperUser, but there is not a single question about Clang as well as the LLVM tag, so I was discouraged. If this question should be anyway, feel free to move it around.
[Edit] It seems that the option is recognized when starting my Makefile from the terminal. When he ran out of Eclipse (Helios), he is not recognized.
[Solution] Discovered. Apparently, the problem was Eclipse (under Ubuntu) is running as root. Why this is so, I have no idea, but the effect is that the $ PATH variable contains what root would be, and not what the user running Eclipse would have. Thus, Eclipse used an older version of Clang (2.80) installed on the system. Added the correct PATH variable in the project properties -> C / C ++ Build -> Environment.
source share