question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot disable warnings in subproject -- warning_level should offer option to pass `-w` to GCC and Clang

See original GitHub issue

In the release notes for Meson 0.50.0 is stated that a warning level of 0 does not enable any static analysis checks. GCC and Clang have a flag that does just that, -w, but it seems that Meson doesn’t pass it to the compiler.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
eli-schwartzcommented, Apr 12, 2021

Disabling warnings in a subproject is an interesting angle that unfortunately wasn’t mentioned in the OP.

And apparently, it turns out you cannot use -Dsubproject:c_args=-w, since c_args is not per subproject. So that shoots down my initial thought on how to do this. Which means adding a warning_level that does it, would be an understandable desire.

0reactions
Tachi107commented, Apr 12, 2021

Looking at the issue tracker it seems that specifying *_args per subproject is something that has been needed/wanted for quite some time.

Even if implementing this using warning_level could be easier, I think what maybe using c_args would be better; passing warning-related options using c_args is a sort of hack, but a negative warning_level would also look like a hack, so if I had to choose I would use an already present hack rather than introducing a new one.

But maybe I’m wrong, who knows

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suppressing Warnings in GCC and Clang
Using command line options to suppress the warning. 2 Sample Project. I want to showcase all 7 different ways how to deal with...
Read more >
Warning Options (Using the GNU Compiler Collection (GCC))
This option controls warnings when a function is used before being declared. This warning is enabled by default in C99 and later dialects...
Read more >
Built-in options - The Meson Build system
Meson provides two kinds of options: build options provided by the build files and built-in options that are either universal options, base options,...
Read more >
Support target_compile_warnings() to set warning like -Wall ...
And Add options to enable all compiler warnings and to treat compiler ... DISABLED (expands to "-w" for clang/gcc/msvc), HIGH (expands to ...
Read more >
B2 User Manual - 1.81.0 - Boost C++ Libraries
For example, when building with <toolset>gcc alternative (2), will be ... This means that for B2, you cannot directly obtain a build variant...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found