Summary: | nine_state.c:1440: error: unknown field ‘m’ specified in initializer | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Other | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | david, opensource |
Version: | 10.5 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | 0001-st-nine-require-gcc-4.6.patch |
Description
Vinson Lee
2015-04-10 19:40:49 UTC
Can you provide which one gcc version is latest working? Created attachment 115012 [details] [review] 0001-st-nine-require-gcc-4.6.patch This is clearly GCC bug[1], should be fixed since GCC 4.6 which every sane X86 & X86_64 distribution will use. Personally I don't see any reason to fix it differently, than raise configure.ac requirement for Nine to >= gcc 4.6. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 (In reply to David Heidelberg (okias) from comment #2) > Created attachment 115012 [details] [review] [review] > 0001-st-nine-require-gcc-4.6.patch > > This is clearly GCC bug[1], should be fixed since GCC 4.6 which every sane > X86 & X86_64 distribution will use. > Just because there is a bug opened about it with GCC that does not make it a GCC bug :-\ The code is using C11 functionality so it's hard to blame the compiler considering that we use -std=c99 > Personally I don't see any reason to fix it differently, than raise > configure.ac requirement for Nine to >= gcc 4.6. > > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 > Imho a better solution would be to add -fms-extensions to the CFLAGS. This will enable anonymous struct/unions and keep things working for pre 4.6 versions of GCC. (In reply to Emil Velikov from comment #3) > Imho a better solution would be to add -fms-extensions to the CFLAGS. This > will enable anonymous struct/unions and keep things working for pre 4.6 > versions of GCC. 1. All developers working on Nine using GCC 4.7 and later, users also don't complain (irc logs, google search for error message). This bug is based on theoretical test with old gcc, but in real-life no one triggered it yet (that's why I did proposed patch, to patch this corner case). Also there is possibility it's not only one problem which will be triggered by older gcc version (maybe not at this moment, but later and will have to workaround it again). Is chance that real user will compile Nine with something older than GCC 4.6 ? Even Ubuntu 12.04 has 4.6.3 (3 years old + there is no problem updating to 4.7 and later). (In reply to Emil Velikov from comment #3) > Imho a better solution would be to add -fms-extensions to the CFLAGS. This > will enable anonymous struct/unions and keep things working for pre 4.6 > versions of GCC. I'm sorry, you're correct, I missed that part about C11 feature. Well, I'm open to adding -fms-extensions . You are correct on the part that pre 4.6 is old and barely widely used. Although as the change is trivial, it might be good to be nice for the extra 1-2 users that might be using it :) After all the decision is between you and Axel to make. commit 56717c0b069a20b0c4438ac1dc9280cd9026b36f Author: David Heidelberg <david@ixit.cz> Date: Sat Apr 11 00:13:53 2015 +0200 st/nine: Require gcc >= 4.6 Nine code uses some C11 features, and this leads to compile error on gcc <= 4.5 Another way would have been to use the -fms-extensions CFLAG Signed-off-by: David Heidelberg <david@ixit.cz> Cc: "10.4 10.5 10.6" <mesa-stable@lists.freedesktop.org> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.