undefined behavior: -Wembedded-directive

warning: embedding a directive within macro arguments has undefined behavior

????? CLANG? why does this take -pedantic to show??

Change-Id: I6f4a9f3db1b89448f9f5d00d82b551e46a6a6964
This commit is contained in:
Qyriad
2025-11-28 21:29:44 +01:00
parent 0423f0ef38
commit d5d03cd8de
2 changed files with 4 additions and 4 deletions
+2
View File
@@ -586,6 +586,8 @@ add_project_arguments(
'-Wdeprecated-copy',
'-Wignored-qualifiers',
'-Werror=suggest-override',
# Undefined behavior.
'-Werror=embedded-directive',
# don't let nlohmann automatically cast enums to ints. we don't set this
# inside libutil headers to not force this behavior on users of libutil.
'-DJSON_DISABLE_ENUM_SERIALIZATION=1',
+2 -4
View File
@@ -212,13 +212,11 @@ VERSIONED_CHARACTERIZATION_TEST(
},
.startTime = 30,
.stopTime = 50,
#if 0
// These fields are not yet serialized.
// FIXME Include in next version of protocol or document
// why they are skipped.
.cpuUser = std::chrono::milliseconds(500s),
.cpuSystem = std::chrono::milliseconds(604s),
#endif
// .cpuUser = std::chrono::milliseconds(500s),
// .cpuSystem = std::chrono::milliseconds(604s),
},
};
t;