GCC has a pre-processor directive called #warning, which simply issues a warning at compile time with an attached string. The GCC documentation says that this can be disabled using the -Wno-cpp flag. However, this flag does not seem to be functioning. I am using GCC 4.4.3.
-Wno-cpp
A simple test case:
#include <iostream> #warning "Hello" int main() { }
which leads to the following:
$ g++ warn.cc warn.cc:2:2: warning: #warning "Hello" $ g++ warn.cc -Wno-cpp warn.cc:2:2: warning: #warning "Hello"
Incorrect documentation?
Wno-cpp , apparently, was not added before GCC 4.6.x - it is not in the documents before those for version 4.5.3: http://gcc.gnu.org/onlinedocs/gcc-4.5.3/ gcc / index.html # toc_Invoking-GCC
Wno-cpp
Source: https://habr.com/ru/post/1402518/More articles:Automatically flush PF_UNIX sockets when exiting a process? - linuxUISplitViewController will not display modal view controller - iphoneWhat is the current preferred method for listing globals in a namespace? - intersystems-cacheType.GetInterfaces () for declared interfaces only - reflectionHow can I catch the event of changing the global cursor icon in C #? - c #Creating Windows shortcuts using Powershell, problems with spaces in the target path - windows-7How to open facebook login dialog in same window instead of popup? - loginGet specific element in webdriver containing text - ruby | fooobar.comHow to check if the device is iPad 3? - xcodeOCX file is not deployed from MSI generated using Visual Studio 2003 in Windows 7 - windows-7All Articles