www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Template instantiation compiler error

↑ ↓ ← 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
→ 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
"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
↑ ↓ → 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