STL errors building setup with gcc 3.4.4

Igor Pechtchanski pechtcha@cs.nyu.edu
Mon Jun 27 21:42:00 GMT 2005


On Mon, 27 Jun 2005, Brian Dessent wrote:

> Brian Dessent wrote:
>
> > If you can reduce the offending parts down to a testcase that might be
> > helpful.  Otherwise for the time being the workarounds of one or more of
>
> Here is the reduced testcase:
>
> #include <vector>
> #include <string>
>
> class OptionSet
> {
>   OptionSet ();
>   std::vector<std::string> const &nonOptions() const;
> private:
>   std::vector<std::string> nonoptions;
> };
>
> OptionSet::OptionSet()
> {
>     nonoptions = std::vector<std::string> ();
> }
>
> std::vector<std::string> const &
> OptionSet::nonOptions() const
> {
>     return nonoptions;
> }
>
> You only get the warnings with -O2 (and -Wall since this isn't a default
> warning) which seems to lead me to believe that it does have to do with
> gcc deciding to inline the function.

Thanks a lot for doing this!

> I'm not a language lawyer, but it does appear that this really is a
> spurious warning.  Should I file a PR?

Please do.  There is no obvious reason why this should be the correct
behavior.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT



More information about the Cygwin-apps mailing list