Archives
D Programming
DD.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++ - Getting weird warnings
This program works, but what are these warnings all about? The program compiles on g++ and bcc32 without complaint. From STL Tutorial and Reference, Second Edition, Musser, Derge, Saini ex02-08.cpp, pp. 29-30 // Demonstrating the generic find algorithm with a deque #include <iostream> #include <cassert> #include <deque> #include <algorithm> // For find using namespace std; template <typename Container> Container make(const char s[]) { return Container(&s[0], &s[strlen(s)]); } int main() { cout << "Demonstrating generic find algorithm with " << "a deque." << endl; deque<char> deque1 = make< deque<char> >("C++ is a better C"); // Search for the first occurrence of the letter e: deque<char>::iterator where = find(deque1.begin(), deque1.end(), 'e'); assert (*where == 'e' && *(where + 1) == 't'); cout << " --- Ok." << endl; return 0; }: C:\dm\bin\sc -Ae -C -WA -S -5 -a8 -o ex02-08.exe ex02-08.cpp -I\dm\stlport\stlport ex02-08.cpp(27) : Warning 12: variable 'char ** __cur_node' used before set ex02-08.cpp(27) : Warning 12: variable 'char ** __cur' used before set ex02-08.cpp(27) : Warning 12: variable 'char ** __cur' used before set link ex02-08,ex02-08,,user32+kernel32/noi; Apr 09 2003
I've had some similar ones from STLPort. I think it's because some STLPort functions throw as the last action within function bodies, so there's no return statement. Oh, no, sorry. That was my errors. Doesn't seem to be the explanation for yours. I'd like to put some effort into the STLPort, if no-one else is - if they are then am more than happy to leave it - but time's not going to be friendly for a while. Is there someone that has taken the STLPort under their wing? (Is that Christof?) "Jim Jennings" <jwjenn mindspring.com> wrote in message news:b72m69$1oin$1 digitaldaemon.com...This program works, but what are these warnings all about? The program compiles on g++ and bcc32 without complaint. From STL Tutorial and Reference, Second Edition, Musser, Derge, Saini ex02-08.cpp, pp. 29-30 // Demonstrating the generic find algorithm with a deque #include <iostream> #include <cassert> #include <deque> #include <algorithm> // For find using namespace std; template <typename Container> Container make(const char s[]) { return Container(&s[0], &s[strlen(s)]); } int main() { cout << "Demonstrating generic find algorithm with " << "a deque." << endl; deque<char> deque1 = make< deque<char> >("C++ is a better C"); // Search for the first occurrence of the letter e: deque<char>::iterator where = find(deque1.begin(), deque1.end(), 'e'); assert (*where == 'e' && *(where + 1) == 't'); cout << " --- Ok." << endl; return 0; }: C:\dm\bin\sc -Ae -C -WA -S -5 -a8 -o ex02-08.exe ex02-08.cpp -I\dm\stlport\stlport ex02-08.cpp(27) : Warning 12: variable 'char ** __cur_node' used before Apr 09 2003
In article <b72obm$1ptq$1 digitaldaemon.com>, Matthew Wilson says...I'd like to put some effort into the STLPort, if no-one else is - if they are then am more than happy to leave it - but time's not going to be friendly for a while. Is there someone that has taken the STLPort under their wing? (Is that Christof?) Apr 10 2003
"Richard Grant" <fractal clark.net> wrote in message news:b74gfm$2uo7$1 digitaldaemon.com...In article <b72obm$1ptq$1 digitaldaemon.com>, Matthew Wilson says... Apr 10 2003
"Jim Jennings" <jwjenn mindspring.com> wrote in message news:b74u7v$5rk$1 digitaldaemon.com...I discovered that the warning messages are caused by the space between the -o flag and the output file name in the command line: C:\dm\bin\sc -Ae -C -WA -S -5 -a8 -o ex02-08.exe ex02-08.cpp -I\dm\stlport\stlport Take out the space and the warnings go away. I will not waste any more time of my time. Jim J. Apr 10 2003
"Walter" <walter digitalmars.com> wrote in message news:b753dc$9bu$2 digitaldaemon.com..."Jim Jennings" <jwjenn mindspring.com> wrote in message news:b74u7v$5rk$1 digitaldaemon.com...I discovered that the warning messages are caused by the space between the -o flag and the output file name in the command line: C:\dm\bin\sc -Ae -C -WA -S -5 -a8 -o ex02-08.exe ex02-08.cpp -I\dm\stlport\stlport Take out the space and the warnings go away. I will not waste any more time of my time. Jim J. Apr 10 2003
"Jim Jennings" <jwjenn mindspring.com> wrote in message news:b758nl$cma$1 digitaldaemon.com...I am using a makefile written for the GNU compiler, that I adapted for Apr 10 2003
"Richard Grant" <fractal clark.net> wrote in message news:b74gfm$2uo7$1 digitaldaemon.com...In article <b72obm$1ptq$1 digitaldaemon.com>, Matthew Wilson says... Apr 10 2003
|