Project

General

Profile

Bug #12164

Updated by Toomas Soome over 2 years ago

Build errors with gcc 9: 
 <pre> 
     In file included from ../include/Audio.h:31, 
                      from AudioCopy.cc:31: 
     ../include/AudioError.h: In member function 'AudioError AudioError::operator=(AudioError)': 
     ../include/AudioError.h:63:53: error: implicitly-declared 'constexpr AudioError::AudioError(const AudioError&)' is deprecated [-Werror=deprecated-copy] 
        63 |        { code = val.code; sys = val.sys; return (*this); } 
           |                                                       ^ 
     ../include/AudioError.h:62:20: note: because 'AudioError' has user-provided 'AudioError AudioError::operator=(AudioError)' 
        62 |    inline AudioError operator = (AudioError val) // Assignment 
           |                      ^~~~~~~~ 
     In file included from ../include/AudioStream.h:93, 
                      from ../include/AudioBuffer.h:32, 
                      from AudioCopy.cc:32: 
     ../include/AudioStream_inline.h: In member function 'void AudioStream::setlength(Double)': 
     ../include/AudioStream_inline.h:57:11: error: implicitly-declared 'constexpr Double& Double::operator=(const Double&)' is deprecated [-Werror=deprecated-copy] 
        57 |    length = len; 
           |             ^~~ 
     In file included from ../include/Audio.h:30, 
                      from AudioCopy.cc:31: 
     ../include/AudioTypes.h:139:2: note: because 'Double' has user-provided 'Double::Double(const Double&)' 
       139 |    Double(const Double &x): val(x.val) { } 
           |    ^~~~~~ 
     In file included from ../include/AudioStream.h:93, 
                      from ../include/AudioBuffer.h:32, 
                      from AudioCopy.cc:32: 
     ../include/AudioStream_inline.h: In member function 'virtual void AudioStream::SetLength(Double)': 
     ../include/AudioStream_inline.h:67:12: error: implicitly-declared 'constexpr Double& Double::operator=(const Double&)' is deprecated [-Werror=deprecated-copy] 
        67 |     length = len; 
           |              ^~~ 
     In file included from ../include/Audio.h:30, 
                      from AudioCopy.cc:31: 
     ../include/AudioTypes.h:139:2: note: because 'Double' has user-provided 'Double::Double(const Double&)' 
       139 |    Double(const Double &x): val(x.val) { } 
           |    ^~~~~~ 
     cc1plus: all warnings being treated as errors 
 </pre> 

 The same issue as in 12139, we need to provide explicit definitions to prevent removal of implicit versions in future compiler versions. 

 Testing done: build/install/boot.

Back