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

Compilation problem with 4.10 #3026

Closed
hulpke opened this issue Nov 19, 2018 · 3 comments
Closed

Compilation problem with 4.10 #3026

hulpke opened this issue Nov 19, 2018 · 3 comments
Labels
kind: bug Issues describing general bugs, and PRs fixing them topic: build system
Milestone

Comments

@hulpke
Copy link
Contributor

hulpke commented Nov 19, 2018

Observed behaviour

when compiling I get an error

C       src/read.c => obj/src/read.lo
src/read.c: In function ‘ReadVar’:
src/read.c:619: error: unknown field ‘var’ specified in initializer
src/read.c:619: warning: missing braces around initializer
src/read.c:619: warning: (near initialization for ‘ref.<anonymous>’)
src/read.c:619: error: unknown field ‘nest0’ specified in initializer
At top level:
cc1: warning: unrecognized command line option "-Wno-cast-function-type"
cc1: warning: unrecognized command line option "-Wno-implicit-fallthrough"

Expected behaviour

GAP should compile. (I can hack around it, but others might not be able to)

Copy and paste GAP banner (to tell us about your setup)

gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)

(This is a system with lots of memory I have access to but no root access. For stability reasons it is still using an older RedHat, so "update the compiler" is not an option for me)

@hulpke hulpke added kind: bug Issues describing general bugs, and PRs fixing them topic: build system backport-to-4.10 labels Nov 19, 2018
@fingolfin
Copy link
Member

This sounds like a compiler bug, but one that we should be able to work around. Could you please try replacing the offending line by this:

    LHSRef ref = { R_INVALID, {0}, {0} };

If that does not help, we can still resort to this:

LHSRef ref; ref.type = R_INVALID; ref.var = 0; ref.nest0 = 0;

or this

LHSRef ref;
memset(&ref, 0, sizeof(ref));

@hulpke
Copy link
Contributor Author

hulpke commented Nov 20, 2018

@fingolfin
The first version you suggest works OK. Thanks.

@olexandr-konovalov
Copy link
Member

Backported to stable-4.10 in 986d08a to be ready for GAP 4.10.1 release.

ssiccha pushed a commit to ssiccha/gap that referenced this issue Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them topic: build system
Projects
None yet
Development

No branches or pull requests

3 participants