Problem
I am trying to remove __attribute__
from my C code before I send it into a parser. Is there a way to define function-like macros using the -D
argument?
Solution using header file
#define __attribute__(x)
Attempted Solution
gcc -E -D__attribute__(x)= testfile.c
gcc -E -D__attribute__(x) testfile.c
from the man pages
So this works on a Unix/Linux shell
on Windows CMD the original expression works, since parentheses aren't special: