Reputation: 8028
I want a command that will completely ignore a function. Somebody once showed me the command, but I can't find it in the manual.
void a()
{
return;
}
#pragma gcc_disable
void a ()
{
return q09w8uifsdf
}
#include <stdio.h>
int main ()
{
a();
}
Upvotes: 1
Views: 553
Reputation: 2711
you do not have any pragma
directives for ignoring a function from executing.. you can just ignore them using conditional preprocessor
directives..
#if
and #ifdef
can be used to ignore a function..
#ifdef
checks whether a MACRO
is defined or not.. and #if 0
can be used to directly ignore a function from executing..
Upvotes: 0
Reputation: 3077
For one liners just comment it out
#define MAYBE /##/
MAYBE int a (){ return 0;}
to keep it
#define MAYBE
MAYBE int a (){ return 0;}
Upvotes: 0
Reputation: 9685
Umm... you mean this?
void a()
{
return;
}
#if 0
void a ()
{
return q09w8uifsdf
}
#endif
#include <stdio.h>
int main ()
{
a();
}
Upvotes: 6