This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Diagnostic Messaging Suggestion
- From: Arthur Schwarz <aschwarz1309 at verizon dot net>
- To: gcc at gcc dot gnu dot org
- Cc: Ian Lance Taylor <iant at google dot com>
- Date: Thu, 16 Apr 2009 12:06:02 -0700 (PDT)
- Subject: Diagnostic Messaging Suggestion
Suggested Messaging: Messaging seems redundant in indicating that function has been redifined twice. One of the messages should be removed. More to the point, I think the messaging may be erroneous - code fragment follows.
g++-4 Diagnostic Messaging
In file included from partition.cpp:66:
irange.h: In function 'std::ostream& operator<<(std::ostream&, ciRange_2::sRange_2&)':
irange.h:102: error: redefinition of 'std::ostream& operator<<(std::ostream&, ciRange_2::sRange_2&)'
irange.h:102: error: 'std::ostream& operator<<(std::ostream&, ciRange_2::sRange_2&)' previously defined here
---- Code Fragment ----
class ciRange_2 : public iRange_List { // <low, high>
public:
struct sRange_2 { double RLo; // Low range value
double RHi; }; // High range value
friend istream& operator>>(istream& stream, ciRange_2::sRange_2& Range);
friend ostream& operator<<(ostream& stream, ciRange_2::sRange_2& Range);
}; // class ciRange_2
istream& operator>>(istream& stream, ciRange_2::sRange_2& Range);
ostream& operator<<(ostream& stream, ciRange_2::sRange_2& Range) {
stream << setw(9) << Range.RLo << " " << setw(9) << Range.RHi;
}