This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: STL errors building setup with gcc 3.4.4


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.

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

Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]