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 1013751 - gcc 4.4 gives an incorrect error with pointer to typedef
Summary: gcc 4.4 gives an incorrect error with pointer to typedef
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc
Version: 6.4
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-30 17:18 UTC by Dave Johansen
Modified: 2016-06-09 17:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-12 22:47:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 42087 0 None None None 2019-03-27 06:49:33 UTC

Description Dave Johansen 2013-09-30 17:18:47 UTC
Description of problem:
gcc 4.4 gives an incorrect error when compiling valid code that is a pointer to a typedef of a template.

Upstream bug 42087 ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42087 ) gives the exact error that I encountered, but it was closed as a duplicate of bug 39390 ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39390 ). There's no detail given in bug 39390 so there's no easy way to tell if the bug was actually a duplicate and if a single fix worked for both.

Version-Release number of selected component (if applicable):
gcc 4.47

How reproducible:
Always

Steps to Reproduce:
1. Copy the reproducer code from Bug 42087
2. Build using "g++ -O2 -Wall -Werror -c tst.cxx"
3. Observe incorrect error output

Actual results:
cc1plus: warnings being treated as errors
tst.cxx: In function ‘int main()’:
tst.cxx:23: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_tree.h:179: note: initialized from here

Expected results:
Output of .o file with correct compilation of code.

Additional info:
I tested this on gcc 4.1.2 on RHEL 5 and it compiled without the error, so this is a regression from RHEL 5.

Comment 2 RHEL Program Management 2013-10-14 01:51:21 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 3 Dave Johansen 2013-10-25 15:16:25 UTC
This is still an issue and I would like to request that a fix be considered for inclusion in the next release.

Comment 4 Marek Polacek 2014-02-12 15:27:34 UTC
Fixed by unbackportable http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=145494.  You can use -Wno-strict-aliasing to disable that warning.

Comment 5 Jeff Law 2014-02-12 22:47:23 UTC
This is not going to be fixed in the RHEL 6 system compilers.  As Marek mentioned, you can use -Wno-strict-aliasing to disable the warning.

The Developer Tool Set (DTS) compilers have the fix identified above and would be another option.

Comment 6 Dave Johansen 2014-02-13 15:15:35 UTC
The DTS is a nice package, but currently it can't be used for building packages in the EPEL ( https://lists.fedoraproject.org/pipermail/epel-devel/2013-September/008737.html ) and has a significantly shorter support life than the compiler that comes with RHEL. So my questions are:
Is RedHat going to help enable the use of DTS with the EPEL?
Is forcing a user to upgrade compilers every few years on what is otherwise a stable platform really the path that RHEL is walking down?

Comment 7 Jeff Law 2014-02-13 16:05:07 UTC
I can't answer the first question, well out of my space.  

As for forcing upgrades, obviously we won't do that.  We will continue to provide compilers in our base version of RHEL that are supported for 10+ years.  However, there are simply some issues which are not feasible to fix in those toolchains without unacceptable risk to our customers and partners.  This happens to be one of them.

Thankfully there is a workaround to either use -Wno-strict-aliasing or use the DTS tools which are considerably newer and which have a fix for this specific problem.

The DTS product is completely optional to our customers and was designed to provide customers a supported means to get access to newer tools as they come available.


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