4 ms·
Your header guard is bad (but not horribly so). Identifiers with two underscores at the beginning are reserved in the C90 standard (as are identifiers with one
by TheNewAndy 16y ago
Your header guard is bad (but not horribly so). Identifiers with two underscores at the beginning are reserved in the C90 standard (as are identifiers with one underscore followed by an upper case letter).
Your comments are also only valid in C99. Unless you have a really good reason, then you should use the block style comments (and I can't think of any good reason). (oh, maybe I should have read your very first sentence... yes that seems like a good reason :-)
- gte910h 16y ago>Your header guard is bad (but not horribly so). Identifiers with two underscores at the beginning are reserved in the C90 standard (as are identifiers with one underscore followed by an upper case letter). That's not actually the header guard that pops out when I put them in (as I do so automatically using vim code similar to that described below), however you are correct that you have a chance to clash with compiler dependent info macros (such as __LINE__) if you use a double underscore before a header guard. I'm going to see if I can edit the post for those who don't see this exchange below. http://yvan.seth.id.au/Entries/Technology/Code/Vim_Header_Guard_Trick.html http://yvan.seth.id.au/Entries/Technology/Code/Vim_Header_Gu... I was trying to simplify yet avoid the UTIL_H clash problem and made an error there.