This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to ignore Wall errors for a portion of code




i,

I am compiling a C code with -Wall -Werror options. In my File I am including another C file which has many Wall errors, which I don't want to check for. Is there a way I can exclude some portion of code from a given file using some kind of #define scheme

void func1()
{
.......
}

#define DISABLE_WERROR 1
include myfile.c
#undef ENABLE_WERROR

void func2()
{
..............
}

Thanks,
Joezac





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]