RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1184346 - -std=gnu99 enables anonymous unions but not designated initialisers
Summary: -std=gnu99 enables anonymous unions but not designated initialisers
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc
Version: 6.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-21 07:08 UTC by Dave Airlie
Modified: 2015-10-09 16:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-09 16:57:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dave Airlie 2015-01-21 07:08:47 UTC
Description of problem:

We need to compile upstream Mesa for RHEL6 backports, however they started using anonymous structs/unions and desginated initialisers, we realised -std=gnu99 would enable the use of anonymous unions on RHEL6, but it falls over when they are used with designated initialisers.


Version-Release number of selected component (if applicable):
gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)

How reproducible:



Steps to Reproduce:
1.

Here is test.c:
struct foo { union { int a; }; }; 

struct foo bar = { .a = 5 };
int main(void) {struct foo f; f.a = 0; return (0);}


2.

gcc -std=gnu99 -o test test.c

Actual results:
test.c:3: error: unknown field ‘a’ specified in initializer

Expected results:

as for gcc 4.8, it should compile.

Additional info:

We really need this to work if at all possible in the system compiler as we need to build newer mesa for RHEL 6.8.

Comment 1 Dave Airlie 2015-01-21 07:17:44 UTC
this looks like 

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676

Comment 3 Dave Airlie 2015-01-22 01:36:39 UTC
It appears upstream Mesa has found MSVC also fails in this area, and has rewritten the code, so we probably won't require this feature at this time, though its possible it will pop up again in future, or that there are other requirements for it.

feel free to close this for now if nobody else has requested anything in this area.

Comment 5 Jeff Law 2015-10-09 16:57:12 UTC
Per c#3.


Note You need to log in before you can comment on or make changes to this bug.