C++: Test for x-macro FP observed in the wild

This commit is contained in:
Jonas Jensen
2019-08-28 11:34:16 +02:00
parent 1bd0c69f0e
commit e7dfb3e61b
4 changed files with 15 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
| complexcondition2.h:0:0:0:0 | complexcondition2.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
| complexcondition.h:0:0:0:0 | complexcondition.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
| fundecl.h:0:0:0:0 | fundecl.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
| items3.h:0:0:0:0 | items3.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
| multipleguards.h:0:0:0:0 | multipleguards.h | This header file should contain a header guard to prevent multiple inclusion ($@ matching $@ occurs before the end of the file). | multipleguards.h:7:1:7:6 | #endif | #endif | multipleguards.h:2:1:2:24 | #ifndef MULTIPLEGUARDS_H | #ifndef MULTIPLEGUARDS_H |
| namespace1.h:0:0:0:0 | namespace1.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |
| namespace2.h:0:0:0:0 | namespace2.h | This header file should contain a header guard to prevent multiple inclusion. | file://:0:0:0:0 | | | file://:0:0:0:0 | | |

View File

@@ -53,3 +53,8 @@ enum Items {
#define XMACRO2(id,desc) void use_##();
#include "items2.h"
#undef XMACRO2
#define XMACRO3(id,desc) static const char * id##_item = "The " desc " item";
#include "items3.h"
// No #undef of XMACRO3. That's handled in items3.h.

View File

@@ -32,3 +32,7 @@ enum Items {
#define XMACRO2(id,desc) void use_##();
#include "items2.h"
#undef XMACRO2
#define XMACRO3(id,desc) static const char * id##_name = desc;
#include "items3.h"
// No #undef of XMACRO3. That's handled in items3.h.

View File

@@ -0,0 +1,5 @@
XMACRO3(shield, "Wooden Shield")
XMACRO3(boots, "Leather Boots")
XMACRO3(helmet, "Helmet")
#undef XMACRO3