www.digitalmars.com         C & C++   DMDScript  

c++ - Template instantiation compiler error

reply Scott Michel <scottm aero.org> writes:
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Walter, et. al.:

I'm compiling up the latest STLport because I'm getting some interesting 
and repeatable bugs in the 4.5.1 package as supplied (and there's 
something to be said for having the latest). In particular, the compiler 
issues the following warnings when expanding the std::List_node_base 
template:

dll_main.cpp(274) : Warning 12: variable 'std::_List_node_base _TMP169' 
used before set
dll_main.cpp(274) : Warning 12: variable 'std::_Slist_node_base _TMP193' 
used before set
dll_main.cpp(274) : Warning 12: variable 'std::_Slist_node_base _TMP193' 
used before set

These symbols don't appear in the preproccessed output, so I'm left 
concluding that the error is a compiler issue. I'm using the latest and 
greatest 8.41.2n scppn.exe.

Sorry that the preprocessor output is so long. I'll try to shrink it 
down to size as time permits.


-scooter
Jul 06 2004
next sibling parent Scott Michel <scottm aero.org> writes:
Command line would also probably help:

dmc -c -o"c:\tmp\dll_main.out" -Ae -Ar -DSTRICT -D__BUILDING_STLPORT 
-I../stlport -o+all -Nc -D_MT "dll_main.cpp"

Also, the bug doesn't reappear if -o+all is used, so it looks like 
there's a possible optimizer error.


-scooter
Jul 06 2004
prev sibling parent reply "Walter" <newshound digitalmars.com> writes:
I wouldn't worry about it. I investigated it once, and it turned out to
actually be a use before set, but it was just used as a 'dummy'. So ignore
the warning.

"Scott Michel" <scottm aero.org> wrote in message
news:ccf4vu$1a4k$2 digitaldaemon.com...
 Walter, et. al.:

 I'm compiling up the latest STLport because I'm getting some interesting
 and repeatable bugs in the 4.5.1 package as supplied (and there's
 something to be said for having the latest). In particular, the compiler
 issues the following warnings when expanding the std::List_node_base
 template:

 dll_main.cpp(274) : Warning 12: variable 'std::_List_node_base _TMP169'
 used before set
 dll_main.cpp(274) : Warning 12: variable 'std::_Slist_node_base _TMP193'
 used before set
 dll_main.cpp(274) : Warning 12: variable 'std::_Slist_node_base _TMP193'
 used before set

 These symbols don't appear in the preproccessed output, so I'm left
 concluding that the error is a compiler issue. I'm using the latest and
 greatest 8.41.2n scppn.exe.

 Sorry that the preprocessor output is so long. I'll try to shrink it
 down to size as time permits.


 -scooter

Jul 07 2004
parent Scott Michel <scottm aero.org> writes:
Walter wrote:

 I wouldn't worry about it. I investigated it once, and it turned out to
 actually be a use before set, but it was just used as a 'dummy'. So ignore
 the warning.

Ok. Apparently it's caused by the optimizer (-o+all). I'll see if I can narrow things down a little more, as in the specific option, if that would help. Because you know that newbies will repeatedly ask about this even if the side effects aren't harmful. -scooter
Jul 07 2004