[cppx] Is C4099 really a sillywarning? (MSVC sillywarnings)

Evidently some people get to my blog by googling up C4099, the MSVC warning that you’ve used struct in one place and class in another place, for the same class. This is one of the alleged sillywarnings in my sillywarnings suppression header. But given e.g. the discussion at StackOverflow, is it really a sillywarning, or perhaps something to take seriously?

[… More] Read all of this posting →

Advertisements

[cppx] /W4, no warnings, part II! (Disabling MSVC sillywarnings)

My original posting on how to avoid MSVC sillywarnings seemed to be quite popular. I’ve now added suppression of two more sillywarnings. The first of these is so braindead as to be almost unbelievable, it’s like it’s directly from the Department of Dumb: for the example below the compiler first (incorrectly) warns that type S “can never be instantiated”, and then it (correctly) goes on to instantiate it…

[… More] Read all of this posting →

[cppx] Hubris, significant spaces, g++

What’s the difference between …

#define CPPX_CSI_DIR( maindir )                 \
    CPPX_CONCAT3( maindir, /, CPPX_CSI_SUBDIR )

… and …

#define CPPX_CSI_DIR( maindir )                 \
    CPPX_CONCAT3_( maindir,/, CPPX_CSI_SUBDIR )

…? Well, the former works with MSVC (Microsoft Visual C++), while the latter works with both MSVC and g++, for the purpose of this macro. The macro is part of a scheme for automatically choosing a compiler specific header, as I described in an earlier posting, and g++ treats spaces, such as the space before the slash, as Very Significant when the macro expansion ends up as the path specification of an #include directive!

[… More] Read all of this posting →