Skip to content

make: clang is more pedantic than gcc #4560

@thomaseichinger

Description

@thomaseichinger

Using -pedantic flag with clang compiler, it considers language extensions as errors. Building tests/fault_handler for native fails with

RIOT/tests/fault_handler/main.c:48:22: error: extension used [-Werror,-Wlanguage-extension-token]
    puts(PRINT_MACRO(INVALID_INSTRUCTION));
                     ^
RIOT/tests/fault_handler/main.c:30:29: note: expanded from macro 'INVALID_INSTRUCTION'
#define INVALID_INSTRUCTION asm (".short 0xdead, 0xbeef, 0xcafe, 0xbabe\n")
                            ^
RIOT/tests/fault_handler/main.c:49:5: error: extension used [-Werror,-Wlanguage-extension-token]
    INVALID_INSTRUCTION;
    ^
RIOT/tests/fault_handler/main.c:30:29: note: expanded from macro 'INVALID_INSTRUCTION'
#define INVALID_INSTRUCTION asm (".short 0xdead, 0xbeef, 0xcafe, 0xbabe\n")

Metadata

Metadata

Assignees

Labels

Area: build systemArea: Build systemPlatform: nativePlatform: This PR/issue effects the native platformType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions