Dave's Brain

Browse - Programming Tips - How can I turn off a gcc compiler warning in my code?

Date: 2015jun4
Product: gcc
OS: Linux

Q.  How can I turn off a gcc compiler warning in my code?
(Not on the command line)

A.  Use a pragma like this:

#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.