[Bug c++/43407] New: Specifying visibility attribute of C++0x enum class emits warning

travis at gockelhut dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 17 16:59:00 GMT 2010


If one specifies any visibility attribute on an enum class emits the "type
attributes ignored after type is already defined" warning.

Easy to reproduce!  Just add the following lines anywhere and compile them
(without -Wno-attributes):

enum class __attribute__((visibility("default"))) Number
{
        Zero, One, Two
};

Obviously this isn't a major concern, since the end result is almost nothing
and 
it certainly isn't "wrong," since the non-finalized standard will not detail
any 
of this behavior, but it kind of annoying in a slight way (barely).


-- 
           Summary: Specifying visibility attribute of C++0x enum class
                    emits warning
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: travis at gockelhut dot com
 GCC build triplet: 3
  GCC host triplet: 4
GCC target triplet: 4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43407



More information about the Gcc-bugs mailing list