Skip to content

Commit 613656b

Browse files
committed
ARMC6: disable "reserved user-defined literal" warning
Clang warns about reserved user-defined literals by default. This warning is not terribly helpful; compilers aren't normally in the habit of warning about use of reserved identifiers. It can interfere with, for example, deliberate emulation of a future standard language feature. The warning was promoted to an error in an mbed client build, due to a non-C++11 "%s"name occurring in a macro. But the macro itself was never invoked, so the misinterpretation as C++11 caused no problems other than this warning. Killing the warning will let that code build on ARMC6. The code already built on GCC and IAR. If that macro ever was used, then a separate error about operator "" name not being defined would be generated, on all 3 toolchains.
1 parent 78f6618 commit 613656b

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

tools/profiles/debug.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"ARMC6": {
1919
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-g", "-O1",
2020
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
21+
"-Wno-reserved-user-defined-literal",
2122
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
2223
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
2324
"-fshort-enums", "-fshort-wchar", "-DMBED_DEBUG",

tools/profiles/develop.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"ARMC6": {
1818
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Os",
1919
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
20+
"-Wno-reserved-user-defined-literal",
2021
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
2122
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
2223
"-fshort-enums", "-fshort-wchar", "-DMBED_TRAP_ERRORS_ENABLED=1"],

tools/profiles/release.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"ARMC6": {
1818
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Oz",
1919
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
20+
"-Wno-reserved-user-defined-literal",
2021
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
2122
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
2223
"-fshort-enums", "-fshort-wchar", "-DNDEBUG"],

0 commit comments

Comments
 (0)