Search
Items tagged with: pragma
PSA: Improvements to #GCC's static analyzer are going to cause (at least) `g_error()` to throw an error about an infinite loop.
Wrap the call in a few pragmas:
```c
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wanalyzer-infinite-loop"
g_error ("Just like this");
#pragma GCC diagnostic pop
```
https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
#GNOME #GLib #C #StaticAnalyzer
I think it would be really funny if the outcome here was a very rapidly standardized Safety Critical C++ subset (with a "#pragma unsafe" to reenable everything else, because why not? rust has it) and nothing changing