Bug 24685
Summary: | g++ 2.96 generates illegal operands in assembly file | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Jacques-Olivier Haenni <haenni> | ||||
Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 7.0 | CC: | haenni | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2001-01-23 15:46:00 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jacques-Olivier Haenni
2001-01-23 13:30:40 UTC
Created attachment 8068 [details]
Preprocessed C++ file generating a compilation error.
This is primarily a bug in dwarf_DST_mem.h, I've reduced your testcase into extern "C" { typedef struct _baz { int a; } baz; extern const baz z; inline bool operator!=(const baz& x, const baz& y) { return x.a != y.a; } }; void foo(); void bar(baz x) { if (x != z) foo(); } . operator!= should definitely not be declared with "C" linkage. I'll ask our C++ language lawyers whether they think there is required diagnostic on this (I haven't found anything in the standard), but I don't think C++ is required to use "C++" linkage for things which cannot be in "C" linkage but are declared so. Fixed in gcc-c++-2.96-72 and above. |