Reputation: 2357
When I compile a program with GCC, it will show that "warning: declaration does not declare anything [-fpermissive]".
The code in question is the following:
typedef int BOOL;
How can I clear the warning?
Upvotes: 0
Views: 1228
Reputation: 102235
You might try the following. Similar worked for me with a union that was catching a warning.
typedef int BOOL;
...
BOOL unused;
(void)unused;
The (void)unused;
avoids the subsequent unused variable warning. Its portable across all compilers.
Upvotes: 2