aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/build-data/buildh.in4
-rw-r--r--src/cli/cli.h7
-rw-r--r--src/tests/tests.h3
3 files changed, 4 insertions, 10 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in
index cacc01ed0..d4972af15 100644
--- a/src/build-data/buildh.in
+++ b/src/build-data/buildh.in
@@ -239,10 +239,6 @@ Each read generates 32 bits of output
#endif
-// Append to macros living outside of functions, so that invocations must end with a semicolon.
-// The struct is only declared to force the semicolon, it is never defined.
-#define BOTAN_FORCE_SEMICOLON struct BOTAN_DUMMY_STRUCT
-
// Check for a common build problem:
#if defined(BOTAN_TARGET_ARCH_IS_X86_64) && ((defined(_MSC_VER) && !defined(_WIN64)) || \
diff --git a/src/cli/cli.h b/src/cli/cli.h
index d096617a3..118d61cb6 100644
--- a/src/cli/cli.h
+++ b/src/cli/cli.h
@@ -185,10 +185,9 @@ class Command
};
};
-#define BOTAN_REGISTER_COMMAND(name, CLI_Class) \
- namespace { Botan_CLI::Command::Registration \
- reg_cmd_ ## CLI_Class(name, []() -> Botan_CLI::Command* { return new CLI_Class; }); } \
- BOTAN_FORCE_SEMICOLON
+#define BOTAN_REGISTER_COMMAND(name, CLI_Class) \
+ Botan_CLI::Command::Registration reg_cmd_ ## CLI_Class(name, \
+ []() -> Botan_CLI::Command* { return new CLI_Class; })
}
diff --git a/src/tests/tests.h b/src/tests/tests.h
index 193f7e06d..36a6d4862 100644
--- a/src/tests/tests.h
+++ b/src/tests/tests.h
@@ -432,8 +432,7 @@ class Test
* Register the test with the runner
*/
#define BOTAN_REGISTER_TEST(type, Test_Class) \
- namespace { Test::Registration reg_ ## Test_Class ## _tests(type, new Test_Class); } \
- BOTAN_FORCE_SEMICOLON
+ Test::Registration reg_ ## Test_Class ## _tests(type, new Test_Class)
/*
* A test based on reading an input file which contains key/value pairs