-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
treewide: compile fixes for native #14663
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments
Feel free to squash |
Building on native reveals error: ISO C forbids initialization between function pointer and ‘void *’ Let's disable that.
binary constants are a GCC extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline. You can directly squash in the style nitpick. Regarding the -Wno-pedantic
: Does this only affect code out of our control?
Is it only me, or are the inline comments gone? |
I don't see it |
OK, the comments was a another So, both comments are addressed already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. This PR does three things:
- Use a different type name (
uint8_t
instead ofchar
), which refers to the same type for all previously supported targets - Use hex instead of binary representation (
0x01
instead of0xb00000001
) of the same numbers - Store a function pointer into an
uint32_t
instead of anvoid *
The first two changes do obviously not change anything in the generated binaries. The third change resulted in identical binaries being build of tests/pkg_semtech-loramac
for the nucleo-f767zi
according to elf_diff
. Thus, no regressions are expected.
Contribution description
char
is unsigned on ARM but signed on x86.This lead to a few compile errors when adding the
periph_gpio
feature tonative
, because now code that was previously never build for x86 got hit by this difference.The host compiler is also usually newer than the embedded one, which usually means it is stricter.
This makes offending
chars
explicitlyunsigned
and works around some pedantry.Testing procedure
No logic changes. In fact, the binaries should stay the same.
Issues/PRs references
split off & needed for #12451
fixes #14667