[opensuse-packaging] C99 keyword "restrict" in package for Leap 42.2 not recognized
Hi, I wanted to build gatling in obs.For Tumbleweed it builds. For Leap 42.1 and 42.2 I get errors like this [1]: [ 48s] dirfd.c:57:62: error: expected ';', ',' or ')' before 'key' [ 48s] struct dircacheentry** hashtable_lookup(const char* restrict key,size_t hashval) { This leads to my conclusion that the C99 keyword restrict [2] is not recognized for Leap but for Tumbleweed. Is there a way to build C99 code for Leap? best regards Thomas [1] https://build.opensuse.org/package/live_build_log/home:Aikhjarto:branches:ho... [2] https://en.wikipedia.org/wiki/Restrict -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
27.11.2016 12:17, Thomas Wagner пишет:
Hi,
I wanted to build gatling in obs.For Tumbleweed it builds. For Leap 42.1 and 42.2 I get errors like this [1]: [ 48s] dirfd.c:57:62: error: expected ';', ',' or ')' before 'key' [ 48s] struct dircacheentry** hashtable_lookup(const char* restrict key,size_t hashval) {
This leads to my conclusion that the C99 keyword restrict [2] is not recognized for Leap but for Tumbleweed. Is there a way to build C99 code for Leap?
Does adding --std=c99 to compiler options help?
best regards
Thomas
[1] https://build.opensuse.org/package/live_build_log/home:Aikhjarto:branches:ho...
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 2016-11-27 10:39, Andrei Borzenkov wrote:
27.11.2016 12:17, Thomas Wagner пишет:
Does adding --std=c99 to compiler options help? Thanks for the hint. However, the problem seems to be that the project has some c-files using "register" from C99 and other using optarg which is not compatible with --std=c99
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sun, 27 Nov 2016, Thomas Wagner wrote:
On 2016-11-27 10:39, Andrei Borzenkov wrote:
27.11.2016 12:17, Thomas Wagner пишет:
Does adding --std=c99 to compiler options help? Thanks for the hint. However, the problem seems to be that the project has some c-files using "register" from C99 and other using optarg which is not compatible with --std=c99
Always use -std=gnu99 to enable GNU extensions as well.
Richard.
--
Richard Biener
On 2016-11-28 09:22, Richard Biener wrote:
On Sun, 27 Nov 2016, Thomas Wagner wrote:
On 2016-11-27 10:39, Andrei Borzenkov wrote:
27.11.2016 12:17, Thomas Wagner пишет:
Does adding --std=c99 to compiler options help? Thanks for the hint. However, the problem seems to be that the project has some c-files using "register" from C99 and other using optarg which is not compatible with --std=c99
Always use -std=gnu99 to enable GNU extensions as well. Thank you! --std=gnu99 did the trick.
best regard Thomas -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sunday 2016-11-27 10:17, Thomas Wagner wrote:
I wanted to build gatling in obs.For Tumbleweed it builds. For Leap 42.1 and 42.2 I get errors like this [1]: [ 48s] dirfd.c:57:62: error: expected ';', ',' or ')' before 'key' [ 48s] struct dircacheentry** hashtable_lookup(const char* restrict key,size_t hashval) {
You have to use the GCC extension "__restrict" when using anything older than C99 or when using C++. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
Jan Engelhardt
-
Richard Biener
-
Thomas Wagner