Can if defined (XX) be placed inside a struct/union in a header file?
struct
{
int i;
#if defined(xx)
int j;
#endif
}t;
I am dealing with a large file base of .c and .h files and I need to know the possible cons of this type of usage.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
While completely valid, a definite con to using this is any time you need to use
t.jyou would also have to surround it with your#if defined(xx)otherwise you will invoke compiler errors