Skip to content
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

Code fails to compile against GCC 9.3.0 (version that ships with Alpine Linux) #50

Closed
Alan-Jowett opened this issue Dec 17, 2020 · 2 comments

Comments

@Alan-Jowett
Copy link
Collaborator

bash-5.0# cc --version
cc (Alpine 9.3.0) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cc -Wall -Werror -Iinc -O2 -g -Wunused-parameter -std=c99 -fPIC   -c -o ubpf_loader.o ubpf_loader.c
ubpf_loader.c: In function 'ubpf_load_elf':
ubpf_loader.c:133:30: error: invalid type argument of '->' (have 'struct section')
  133 |                 (&sections[i]->size > 0)) {

Looks like GCC is confused about order of operators here. Adding a () around it fixes it.

@Alan-Jowett
Copy link
Collaborator Author

Wrong fork.

@jpsamaroo
Copy link

Sorry, that was fixed on my dev branch jps/dev. I rebased pushed the fixed commit to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants