Opened 12 years ago

Closed 12 years ago

#5081 closed Patches (invalid)

Extra semicolons cause clang to emit warnings

Reported by: Marshall Clow Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost 1.46.0 Severity: Cosmetic
Keywords: Cc:

Description

While compiling with clang TOT, I got a series of warnings like

In file included from ../../../libs/test/src/unit_test_monitor.cpp:16:
In file included from ../../../boost/test/impl/unit_test_monitor.ipp:20:
../../../boost/test/unit_test_monitor.hpp:56:53: warning: extra ';' inside a class [-pedantic]
    BOOST_TEST_SINGLETON_CONS( unit_test_monitor_t );
                                                    ^
In file included from ../../../libs/test/src/unit_test_monitor.cpp:16:
In file included from ../../../boost/test/impl/unit_test_monitor.ipp:22:
In file included from ../../../boost/test/test_tools.hpp:19:
../../../boost/test/predicate_result.hpp:44:37: warning: extra ';' inside a struct [-pedantic]
    struct dummy { void nonnull() {}; };

Attached is a patch to silence these warnings.

Attachments (1)

5081-mtc.patch (2.2 KB ) - added by Marshall Clow 12 years ago.
Removes unnecessary semicolons

Download all attachments as: .zip

Change History (3)

by Marshall Clow, 12 years ago

Attachment: 5081-mtc.patch added

Removes unnecessary semicolons

comment:1 by Steven Watanabe, 12 years ago

Clang is wrong here. If you check the standard, you'll find that a semicolon is permitted after the definition of a member function. I don't know why, but that's what the grammar says.

comment:2 by Marshall Clow, 12 years ago

Resolution: invalid
Status: newclosed

Bug in clang - fixed now.

Note: See TracTickets for help on using tickets.