Answers for "gcc warnings"

C++
0

gcc suppress warning inline

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"

void f(int a, int b)
{
    std::cout << a << '\n';
    // we are not using b!
}

#pragma GCC diagnostic pop
Posted by: Guest on January-20-2021
0

c compile using gcc considering warnings as errors

carrie@ubuntu:/debugging$ gcc -Wall -pedantic -Werror -Wextra -std=gnu89 positive_or_negative.c 0-main.c -o 0-main
Posted by: Guest on June-24-2021

Browse Popular Code Answers by Language