STL errors building setup with gcc 3.4.4
Brian Dessent
brian@dessent.net
Mon Jun 27 21:10:00 GMT 2005
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
More information about the Cygwin-apps
mailing list