[Libreoffice-bugs] [Bug 122605] New: New GCC 9 warning

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Jan 9 15:34:46 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=122605

            Bug ID: 122605
           Summary: New GCC 9 warning
           Product: cppunit
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: General
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mliska at suse.cz
                CC: markus.mohrhard at googlemail.com

Using latest GCC 9 one can see (with default -Wdeprecated-copy):

[  113s] In file included from ../../include/cppunit/TestCase.h:6,
[  113s]                  from ../../include/cppunit/TestCaller.h:5,
[  113s]                  from
../../include/cppunit/extensions/HelperMacros.h:9,
[  113s]                  from OrthodoxTest.h:4,
[  113s]                  from OrthodoxTest.cpp:2:
[  113s] ../../include/cppunit/extensions/Orthodox.h: In instantiation of 'void
CppUnit::Orthodox<ClassUnderTest>::runTest() [with ClassUnderTest =
OrthodoxTest::ValueBadAssignment]':
[  113s] ../../include/cppunit/extensions/Orthodox.h:56:38:   required from
here
[  113s] ../../include/cppunit/extensions/Orthodox.h:77:23: error:
implicitly-declared 'constexpr
OrthodoxTest::ValueBadAssignment::ValueBadAssignment(const
OrthodoxTest::ValueBadAssignment&)' is deprecated [-Werror=deprecated-copy]
[  113s]    77 |     CPPUNIT_ASSERT (c == call (a));
[  113s] ../../include/cppunit/TestAssert.h:240:37: note: in definition of
macro 'CPPUNIT_ASSERT'
[  113s]   240 |   ( CPPUNIT_NS::Asserter::failIf( !(condition),               
                   \
[  113s]       |                                     ^~~~~~~~~
[  113s] In file included from OrthodoxTest.cpp:2:
[  113s] OrthodoxTest.h:159:25: note: because
'OrthodoxTest::ValueBadAssignment' has user-provided
'OrthodoxTest::ValueBadAssignment&
OrthodoxTest::ValueBadAssignment::operator=(const
OrthodoxTest::ValueBadAssignment&)'
[  113s]   159 |     ValueBadAssignment &operator =( const ValueBadAssignment &
)
[  113s]       |                         ^~~~~~~~
[  113s] In file included from OrthodoxTest.cpp:3:
[  113s] ../../include/cppunit/extensions/Orthodox.h:87:63: note:  
initializing argument 1 of 'ClassUnderTest
CppUnit::Orthodox<ClassUnderTest>::call(ClassUnderTest) [with ClassUnderTest =
OrthodoxTest::ValueBadAssignment]'
[  113s]    87 | ClassUnderTest Orthodox<ClassUnderTest>::call (ClassUnderTest
object)
[  113s]       |                                               
~~~~~~~~~~~~~~~^~~~~~
[  113s] In file included from ../../include/cppunit/TestCase.h:6,
[  113s]                  from ../../include/cppunit/TestCaller.h:5,
[  113s]                  from
../../include/cppunit/extensions/HelperMacros.h:9,
[  113s]                  from OrthodoxTest.h:4,
[  113s]                  from OrthodoxTest.cpp:2:
[  113s] ../../include/cppunit/extensions/Orthodox.h:80:23: error:
implicitly-declared 'constexpr
OrthodoxTest::ValueBadAssignment::ValueBadAssignment(const
OrthodoxTest::ValueBadAssignment&)' is deprecated [-Werror=deprecated-copy]
[  113s]    80 |     CPPUNIT_ASSERT (c == call (b));
[  113s] ../../include/cppunit/TestAssert.h:240:37: note: in definition of
macro 'CPPUNIT_ASSERT'
[  113s]   240 |   ( CPPUNIT_NS::Asserter::failIf( !(condition),               
                   \
[  113s]       |                                     ^~~~~~~~~
[  113s] In file included from OrthodoxTest.cpp:2:
[  113s] OrthodoxTest.h:159:25: note: because
'OrthodoxTest::ValueBadAssignment' has user-provided
'OrthodoxTest::ValueBadAssignment&
OrthodoxTest::ValueBadAssignment::operator=(const
OrthodoxTest::ValueBadAssignment&)'
[  113s]   159 |     ValueBadAssignment &operator =( const ValueBadAssignment &
)
[  113s]       |                         ^~~~~~~~
[  113s] In file included from OrthodoxTest.cpp:3:
[  113s] ../../include/cppunit/extensions/Orthodox.h:87:63: note:  
initializing argument 1 of 'ClassUnderTest
CppUnit::Orthodox<ClassUnderTest>::call(ClassUnderTest) [with ClassUnderTest =
OrthodoxTest::ValueBadAssignment]'
[  113s]    87 | ClassUnderTest Orthodox<ClassUnderTest>::call (ClassUnderTest
object)
[  113s]       |                                               
~~~~~~~~~~~~~~~^~~~~~
[  113s] ../../include/cppunit/extensions/Orthodox.h: In instantiation of 'void
CppUnit::Orthodox<ClassUnderTest>::runTest() [with ClassUnderTest =
OrthodoxTest::ValueBadCall]':
[  113s] ../../include/cppunit/extensions/Orthodox.h:56:38:   required from
here
[  113s] ../../include/cppunit/extensions/Orthodox.h:65:5: error:
implicitly-declared 'OrthodoxTest::ValueBadCall&
OrthodoxTest::ValueBadCall::operator=(const OrthodoxTest::ValueBadCall&)' is
deprecated [-Werror=deprecated-copy]
[  113s]    65 |     b.operator= (a.operator! ());
[  113s]       |     ^
[  113s] In file included from OrthodoxTest.cpp:2:
[  113s] OrthodoxTest.h:136:5: note: because 'OrthodoxTest::ValueBadCall' has
user-provided 'OrthodoxTest::ValueBadCall::ValueBadCall(const
OrthodoxTest::ValueBadCall&)'
[  113s]   136 |     ValueBadCall( const ValueBadCall & ) : Value()
[  113s]       |     ^~~~~~~~~~~~
[  113s] In file included from OrthodoxTest.cpp:3:
[  113s] ../../include/cppunit/extensions/Orthodox.h:69:7: error:
implicitly-declared 'OrthodoxTest::ValueBadCall&
OrthodoxTest::ValueBadCall::operator=(const OrthodoxTest::ValueBadCall&)' is
deprecated [-Werror=deprecated-copy]
[  113s]    69 |     b = !!a;
[  113s]       |     ~~^~~~~
[  113s] In file included from OrthodoxTest.cpp:2:
[  113s] OrthodoxTest.h:136:5: note: because 'OrthodoxTest::ValueBadCall' has
user-provided 'OrthodoxTest::ValueBadCall::ValueBadCall(const
OrthodoxTest::ValueBadCall&)'
[  113s]   136 |     ValueBadCall( const ValueBadCall & ) : Value()
[  113s]       |     ^~~~~~~~~~~~
[  113s] In file included from OrthodoxTest.cpp:3:
[  113s] ../../include/cppunit/extensions/Orthodox.h:73:7: error:
implicitly-declared 'OrthodoxTest::ValueBadCall&
OrthodoxTest::ValueBadCall::operator=(const OrthodoxTest::ValueBadCall&)' is
deprecated [-Werror=deprecated-copy]
[  113s]    73 |     b = !a;
[  113s]       |     ~~^~~~
[  113s] In file included from OrthodoxTest.cpp:2:
[  114s] OrthodoxTest.h:136:5: note: because 'OrthodoxTest::ValueBadCall' has
user-provided 'OrthodoxTest::ValueBadCall::ValueBadCall(const
OrthodoxTest::ValueBadCall&)'
[  114s]   136 |     ValueBadCall( const ValueBadCall & ) : Value()
[  114s]       |     ^~~~~~~~~~~~
[  114s] In file included from OrthodoxTest.cpp:3:
[  114s] ../../include/cppunit/extensions/Orthodox.h:76:7: error:
implicitly-declared 'OrthodoxTest::ValueBadCall&
OrthodoxTest::ValueBadCall::operator=(const OrthodoxTest::ValueBadCall&)' is
deprecated [-Werror=deprecated-copy]
[  114s]    76 |     c = a;
[  114s]       |     ~~^~~
[  114s] In file included from OrthodoxTest.cpp:2:
[  114s] OrthodoxTest.h:136:5: note: because 'OrthodoxTest::ValueBadCall' has
user-provided 'OrthodoxTest::ValueBadCall::ValueBadCall(const
OrthodoxTest::ValueBadCall&)'
[  114s]   136 |     ValueBadCall( const ValueBadCall & ) : Value()
[  114s]       |     ^~~~~~~~~~~~
[  114s] In file included from OrthodoxTest.cpp:3:
[  114s] ../../include/cppunit/extensions/Orthodox.h:79:7: error:
implicitly-declared 'OrthodoxTest::ValueBadCall&
OrthodoxTest::ValueBadCall::operator=(const OrthodoxTest::ValueBadCall&)' is
deprecated [-Werror=deprecated-copy]
[  114s]    79 |     c = b;
[  114s]       |     ~~^~~
[  114s] In file included from OrthodoxTest.cpp:2:
[  114s] OrthodoxTest.h:136:5: note: because 'OrthodoxTest::ValueBadCall' has
user-provided 'OrthodoxTest::ValueBadCall::ValueBadCall(const
OrthodoxTest::ValueBadCall&)'
[  114s]   136 |     ValueBadCall( const ValueBadCall & ) : Value()
[  114s]       |     ^~~~~~~~~~~~
[  114s] In file included from ../../include/cppunit/TestCase.h:6,
[  114s]                  from ../../include/cppunit/TestCaller.h:5,
[  114s]                  from
../../include/cppunit/extensions/HelperMacros.h:9,
[  114s]                  from OrthodoxTest.h:4,
[  114s]                  from OrthodoxTest.cpp:2:
[  114s] ../../include/cppunit/extensions/Orthodox.h: In instantiation of 'void
CppUnit::Orthodox<ClassUnderTest>::runTest() [with ClassUnderTest =
OrthodoxTest::Value]':
[  114s] ../../include/cppunit/extensions/Orthodox.h:56:38:   required from
here
[  114s] ../../include/cppunit/extensions/Orthodox.h:77:23: error:
implicitly-declared 'constexpr OrthodoxTest::Value::Value(const
OrthodoxTest::Value&)' is deprecated [-Werror=deprecated-copy]
[  114s]    77 |     CPPUNIT_ASSERT (c == call (a));
[  114s] ../../include/cppunit/TestAssert.h:240:37: note: in definition of
macro 'CPPUNIT_ASSERT'
[  114s]   240 |   ( CPPUNIT_NS::Asserter::failIf( !(condition),               
                   \
[  114s]       |                                     ^~~~~~~~~
[  114s] In file included from OrthodoxTest.cpp:2:
[  114s] OrthodoxTest.h:41:12: note: because 'OrthodoxTest::Value' has
user-provided 'OrthodoxTest::Value& OrthodoxTest::Value::operator=(const
OrthodoxTest::Value&)'
[  114s]    41 |     Value& operator= ( const Value& v )
[  114s]       |            ^~~~~~~~
[  114s] In file included from OrthodoxTest.cpp:3:
[  114s] ../../include/cppunit/extensions/Orthodox.h:87:63: note:  
initializing argument 1 of 'ClassUnderTest
CppUnit::Orthodox<ClassUnderTest>::call(ClassUnderTest) [with ClassUnderTest =
OrthodoxTest::Value]'
[  114s]    87 | ClassUnderTest Orthodox<ClassUnderTest>::call (ClassUnderTest
object)
[  114s]       |                                               
~~~~~~~~~~~~~~~^~~~~~
[  114s] In file included from ../../include/cppunit/TestCase.h:6,
[  114s]                  from ../../include/cppunit/TestCaller.h:5,
[  114s]                  from
../../include/cppunit/extensions/HelperMacros.h:9,
[  114s]                  from OrthodoxTest.h:4,
[  114s]                  from OrthodoxTest.cpp:2:
[  114s] ../../include/cppunit/extensions/Orthodox.h:80:23: error:
implicitly-declared 'constexpr OrthodoxTest::Value::Value(const
OrthodoxTest::Value&)' is deprecated [-Werror=deprecated-copy]
[  114s]    80 |     CPPUNIT_ASSERT (c == call (b));
[  114s] ../../include/cppunit/TestAssert.h:240:37: note: in definition of
macro 'CPPUNIT_ASSERT'
[  114s]   240 |   ( CPPUNIT_NS::Asserter::failIf( !(condition),               
                   \
[  114s]       |                                     ^~~~~~~~~
[  114s] In file included from OrthodoxTest.cpp:2:
[  114s] OrthodoxTest.h:41:12: note: because 'OrthodoxTest::Value' has
user-provided 'OrthodoxTest::Value& OrthodoxTest::Value::operator=(const
OrthodoxTest::Value&)'
[  114s]    41 |     Value& operator= ( const Value& v )
[  114s]       |            ^~~~~~~~
[  114s] In file included from OrthodoxTest.cpp:3:
[  114s] ../../include/cppunit/extensions/Orthodox.h:87:63: note:  
initializing argument 1 of 'ClassUnderTest
CppUnit::Orthodox<ClassUnderTest>::call(ClassUnderTest) [with ClassUnderTest =
OrthodoxTest::Value]'
[  114s]    87 | ClassUnderTest Orthodox<ClassUnderTest>::call (ClassUnderTest
object)
[  114s]       |                                               
~~~~~~~~~~~~~~~^~~~~~
[  114s] ../../include/cppunit/extensions/Orthodox.h: In instantiation of
'ClassUnderTest CppUnit::Orthodox<ClassUnderTest>::call(ClassUnderTest) [with
ClassUnderTest = OrthodoxTest::ValueBadAssignment]':
[  114s] ../../include/cppunit/extensions/Orthodox.h:77:5:   required from
'void CppUnit::Orthodox<ClassUnderTest>::runTest() [with ClassUnderTest =
OrthodoxTest::ValueBadAssignment]'
[  114s] ../../include/cppunit/extensions/Orthodox.h:56:38:   required from
here
[  114s] ../../include/cppunit/extensions/Orthodox.h:89:12: error:
implicitly-declared 'constexpr
OrthodoxTest::ValueBadAssignment::ValueBadAssignment(const
OrthodoxTest::ValueBadAssignment&)' is deprecated [-Werror=deprecated-copy]
[  114s]    89 |     return object;
[  114s]       |            ^~~~~~
[  114s] In file included from OrthodoxTest.cpp:2:
[  114s] OrthodoxTest.h:159:25: note: because
'OrthodoxTest::ValueBadAssignment' has user-provided
'OrthodoxTest::ValueBadAssignment&
OrthodoxTest::ValueBadAssignment::operator=(const
OrthodoxTest::ValueBadAssignment&)'
[  114s]   159 |     ValueBadAssignment &operator =( const ValueBadAssignment &
)
[  114s]       |                         ^~~~~~~~
[  114s] In file included from OrthodoxTest.cpp:3:
[  114s] ../../include/cppunit/extensions/Orthodox.h: In instantiation of
'ClassUnderTest CppUnit::Orthodox<ClassUnderTest>::call(ClassUnderTest) [with
ClassUnderTest = OrthodoxTest::Value]':
[  114s] ../../include/cppunit/extensions/Orthodox.h:77:5:   required from
'void CppUnit::Orthodox<ClassUnderTest>::runTest() [with ClassUnderTest =
OrthodoxTest::Value]'
[  114s] ../../include/cppunit/extensions/Orthodox.h:56:38:   required from
here
[  114s] ../../include/cppunit/extensions/Orthodox.h:89:12: error:
implicitly-declared 'constexpr OrthodoxTest::Value::Value(const
OrthodoxTest::Value&)' is deprecated [-Werror=deprecated-copy]
[  114s]    89 |     return object;
[  114s]       |            ^~~~~~
[  114s] In file included from OrthodoxTest.cpp:2:
[  114s] OrthodoxTest.h:41:12: note: because 'OrthodoxTest::Value' has
user-provided 'OrthodoxTest::Value& OrthodoxTest::Value::operator=(const
OrthodoxTest::Value&)'
[  114s]    41 |     Value& operator= ( const Value& v )
[  114s]       |            ^~~~~~~~
[  115s] g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -I../../include   -O2
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -g -Werror -Wall -Wextra
-pedantic -c -o SubclassedTestCase.o SubclassedTestCase.cpp
[  116s] g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -I../../include   -O2
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -g -Werror -Wall -Wextra
-pedantic -c -o TestAssertTest.o TestAssertTest.cpp
[  117s] g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -I../../include   -O2
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -g -Werror -Wall -Wextra
-pedantic -c -o TestCallerTest.o TestCallerTest.cpp
[  119s] g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -I../../include   -O2
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -g -Werror -Wall -Wextra
-pedantic -c -o TestCaseTest.o TestCaseTest.cpp

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190109/06573e19/attachment-0001.html>


More information about the Libreoffice-bugs mailing list