Bug 75308 - A static int const class variable becomes undefined in the symbols of the object file
A static int const class variable becomes undefined in the symbols of the obj...
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-07 01:39 EDT by Mark Goodman
Modified: 2007-04-18 12:47 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-10-07 01:40:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test case for this bug (246 bytes, text/plain)
2002-10-07 01:40 EDT, Mark Goodman
no flags Details

  None (edit)
Description Mark Goodman 2002-10-07 01:39:07 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20020922

Description of problem:
A static int const class variable lists with the symbol type U in nm.  The
object file does not link because the constructor refers to it.


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


How reproducible:
Always

Steps to Reproduce:
1. g++ testclass.cc -o testclass 
2.
3.
	

Actual Results:  /tmp/cc8FUTRi.o: In function
`TestClass::TestClass[in-charge](TestClass const*)':
/tmp/cc8FUTRi.o(.gnu.linkonce.t._ZN9TestClassC1EPKS_+0x17): undefined reference
to `TestClass::notDefined'
collect2: ld returned 1 exit status


Expected Results:  Nothing should have printed and the file should have
successfully linked.

Additional info:
Comment 1 Mark Goodman 2002-10-07 01:40:37 EDT
Created attachment 79124 [details]
Test case for this bug
Comment 2 Mark Goodman 2002-10-08 13:48:15 EDT
I had forget about the one definition rule.  Oops!

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