This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS C++ bug


On Jun 17, 2003, Daniel Jacobowitz <drow@mvista.com> wrote:

> Sounds like an optimization deficiency; I believe the program is
> allowed, but not required, to fail to compile.

None of the translation units can fail to compile, since only the
linker can tell whether the static data member was actually defined.
And then, in case the static data member is not explicitly defined,
but all references to it ended up being optimized into constants, the
linker lacks sufficient information to tell whether the static data
member was actually referenced in any translation unit.  Even though I
think it would be legitimate to report an error even if the member
wasn't explicitly referenced, the linker would also lack information
to do that too.  That's why the standard defines this error condition
as one for which no diagnostic is required.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]