Top "Gcc-warning" questions

GCC is the GNU Compiler Collection, encompassing the gcc C compiler and the g++ C++ compiler, among others.

Why does gcc -Wall give warning about zero-length format string?

I searched around a little bit for information on this but didn't find anything satisfactory. Is there some special behavior …

c gcc string-formatting printf gcc-warning
expected expected ‘const char **’ but argument is of type ‘char **’

Here is the compile warning i have: src/Debugger.c:219:52: warning: passing argument 2 of ‘Debugger_Command[i].Callback’ from incompatible …

c gcc-warning
Don't understand "assuming signed overflow" warning

I am getting: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false […

c++ gcc gcc-warning
Is there any way to get readable gcc error and warning output at the command line?

For some long errors, the gcc output is dense and has lots of line-wrapping etc. Especially when errors are subtle, …

c++ c gcc gcc-warning
What is &&& operation in C

#include <stdio.h> volatile int i; int main() { int c; for (i = 0; i < 3; i++) { c = i &&…

c++ c operators compiler-optimization gcc-warning
How to print the address of a function?

I let gcc compile the following example using -Wall -pedantic: #include <stdio.h> int main(void) { printf("main: %…

c linux gcc function-pointers gcc-warning
narrowing conversion from int to long unsigned int {} is ill-formed in C++11

when I run the below code - I'm getting the warning "narrowing conversion from int to long unsigned int inside {} …

c++ c c++11 gcc-warning gcc4.8
Suppressing "ISO C99 requires rest arguments to be used"

Consider the following two macros: #define PNORM( v, s, ... ) { \ if( VERBOSITY_CHECK( v ) ) { \ if( ( errno = pthread_mutex_lock(&server.…

c gcc posix variadic-functions gcc-warning
What does if((x=0)) mean in C?

So apparently, in gcc/C, a compiler compiles when if ((x=0)){ some code } is used, while when if (x=0){ some …

c gcc gcc-warning
How to use C++20's likely/unlikely attribute in if-else statement

This question is about C++20's [[likely]]/[[unlikely]] feature, not compiler-defined macros. This documents (cppreference) only gave an example on …

c++ gcc-warning c++20