Topic: HELP !!


Author: "Arun Annaji" <arun.annaji@pcm.bosch.de>
Date: 1999/09/25
Raw View
Hello,

I tried compiling the following piece of code on GCC-2.7.2.1. In the debug
mode of compilation('g' option), no warning were generated. But when I tried
optimize the same for speed, using the O2 option, the compiler generated the
following warnings. Why is it so?

Warnings generated for the O2 option:
/opt/FSFlibg++/lib/g++-include/list.h: In function `void fnc(class
list<basic_string<char,string_char_traits<char> > > &)':
/opt/FSFlibg++/lib/g++-include/list.h:210: warning: `struct
list<basic_string<char,string_char_traits<char> > >::list_node * tmp' might
be used uninitialized in this function
/opt/FSFlibg++/lib/g++-include/list.h:221: warning: `struct
list<basic_string<char,string_char_traits<char> > >::list_node * x' might be
used uninitialized in this function


The compiler options are:
 -O2 -DTA_SOLARIS -DTA_GNU_2721 -frtti -fhandle-exceptions -Wall

My code :
*********************************************************
#include <typeinfo>
#include <string>
#include <list>

void fnc(list<string>& temp_list);

void main()
{
  list<string> temp;
  string temp_str;

  fnc(temp);
}


void fnc(list<string>& temp_list)
{
  string temp_str("hello");
  temp_list.push_back(temp_str);
}
*********************************************************
Thanks in advance.



Regards,
Gopi




[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: se1pc@dmu.ac.uk (Paul Chapman)
Date: Fri, 13 Jan 1995 11:45:30 GMT
Raw View
I need a program allowing two pc's linked via a standard 3 wire serial cable
through com1 to communicate as in winpopup or unix-talk. Can anyone
advise me as to the best way to produce this software ??
The program will preferably be a TSR.

PLease address all replies to se1pc@dmu.ac.uk

Thanx....