-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Usage of GCC extension for binary constants #7918
Copy link
Copy link
Closed
Labels
Area: build systemArea: Build systemArea: Build systemDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRThe issue/PR is used as a discussion starting point about the item of the issue/PRState: staleState: The issue / PR has no activity for >185 daysState: The issue / PR has no activity for >185 daysType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)
Description
I was trying to compile RIOT with -Wpedantic (+ -Wall -Werror ...) and ran into several errors like the following:
/RIOT/boards/pba-d-01-kw2x/include/periph_conf.h:52:18: error: binary constants are a GCC extension
.fll_frdiv = 0b010, /* Divide by 128 */
^
It seems that usage of 0b* is not generally recommended. There are not that many places where such is used in RIOT, however, to get RIOT compiled with -Wpedantic in the (far) future we need to find a solution - or wait that compilers don't see this as a problem.
What's the general opinion on this?
Reactions are currently unavailable
Metadata
Metadata
Labels
Area: build systemArea: Build systemArea: Build systemDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRThe issue/PR is used as a discussion starting point about the item of the issue/PRState: staleState: The issue / PR has no activity for >185 daysState: The issue / PR has no activity for >185 daysType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)