Hi,
Just wanted to point out this warning from the Intel v12 compiler.
/Users/kbelco/boost/boost/units/unit.hpp(49): warning #1011: missing
return statement at end of non-void function "boost::units::unit
On Nov 27, 2010, at 10:22 AM, Belcourt, K. Noel wrote:
Hi,
Just wanted to point out this warning from the Intel v12 compiler.
/Users/kbelco/boost/boost/units/unit.hpp(49): warning #1011: missing return statement at end of non-void function "boost::units::unit
::operator=(const boost::units::unit &)" this_type& operator=(const this_type&) { } Perhaps there's an easy warning suppression fix?
Interesting. That's a class that, as far as I can tell, has no data members - just routines and typedefs. If so, I think that the best solution would be to remove the copy constructor and the assignment operator and let the compiler generate them (and probably the default constructor, too). Remove code, reduce warnings. :-) -- Marshall
AMDG On 11/27/2010 10:40 AM, Marshall Clow wrote:
On Nov 27, 2010, at 10:22 AM, Belcourt, K. Noel wrote:
Just wanted to point out this warning from the Intel v12 compiler.
/Users/kbelco/boost/boost/units/unit.hpp(49): warning #1011: missing return statement at end of non-void function "boost::units::unit
::operator=(const boost::units::unit &)" this_type& operator=(const this_type&) { } Perhaps there's an easy warning suppression fix? Interesting. That's a class that, as far as I can tell, has no data members - just routines and typedefs.
If so, I think that the best solution would be to remove the copy constructor and the assignment operator and let the compiler generate them (and probably the default constructor, too).
Remove code, reduce warnings. :-)
I'm hesitant to remove them, because I recall having to add default constructors to some classes to keep at least one compiler happy. In Christ, Steven Watanabe
On Nov 27, 2010, at 12:13 PM, Steven Watanabe wrote:
AMDG
On 11/27/2010 10:40 AM, Marshall Clow wrote:
On Nov 27, 2010, at 10:22 AM, Belcourt, K. Noel wrote:
Just wanted to point out this warning from the Intel v12 compiler.
/Users/kbelco/boost/boost/units/unit.hpp(49): warning #1011: missing return statement at end of non-void function "boost::units::unit
::operator=(const boost::units::unit &)" this_type& operator=(const this_type&) { } Perhaps there's an easy warning suppression fix? Interesting. That's a class that, as far as I can tell, has no data members - just routines and typedefs.
If so, I think that the best solution would be to remove the copy constructor and the assignment operator and let the compiler generate them (and probably the default constructor, too).
Remove code, reduce warnings. :-)
I'm hesitant to remove them, because I recall having to add default constructors to some classes to keep at least one compiler happy.
Would a 'return *this' be adequate (if semantically incorrect) to address the problem (given the lack of data members)? -- Noel
AMDG On 11/27/2010 10:22 AM, Belcourt, K. Noel wrote:
Just wanted to point out this warning from the Intel v12 compiler.
/Users/kbelco/boost/boost/units/unit.hpp(49): warning #1011: missing return statement at end of non-void function "boost::units::unit
::operator=(const boost::units::unit &)" this_type& operator=(const this_type&) { } Perhaps there's an easy warning suppression fix?
Fixed in trunk. In Christ, Steven Watanabe
On Nov 27, 2010, at 12:33 PM, Steven Watanabe wrote:
On 11/27/2010 10:22 AM, Belcourt, K. Noel wrote:
Just wanted to point out this warning from the Intel v12 compiler.
/Users/kbelco/boost/boost/units/unit.hpp(49): warning #1011: missing return statement at end of non-void function "boost::units::unit
::operator=(const boost::units::unit &)" this_type& operator=(const this_type&) { } Perhaps there's an easy warning suppression fix?
Fixed in trunk.
Yes, compiles cleanly, thanks! -- Noel
participants (3)
-
Belcourt, K. Noel
-
Marshall Clow
-
Steven Watanabe