Is it possible to add GCC -pedantic to the command line, but not warn about the "long long",

I mainly use GCC to develop my library, but I would like as much as possible to ensure compatibility with several compilers and especially standard compliance. To do this, I added several flags -W...to the command line. I would also add -pedantic, but I have a problem with its type warning long long. The latter is important for my library and is properly protected by code #if, that is, it does not compile in compilers that do not know this anyway.

In short: can I enable GCC in mode -pedanticabout any extension except long long?

+3
source share
1 answer

add -Wno-long-longor switch to C99 (use the gcc -std = c99 flag). c99 provides a long length.

+4
source

Source: https://habr.com/ru/post/1742341/


All Articles