public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19404] New: error: 'QSizePolicy::<anonymous enum>' uses anonymous type
@ 2005-01-12 18:46 Woebbeking at web dot de
  2005-01-12 18:53 ` [Bug c++/19404] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Woebbeking at web dot de @ 2005-01-12 18:46 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]

Hi, 
 
the following Code doesn't compile: 
 
 
class Base; 
 
 
template<typename Type> 
inline 
Base& 
operator<<(Base& rConfiguration, 
           Type const& rType) 
{ 
    return rConfiguration; 
} 
 
 
template<typename Type> 
inline 
Base const& 
operator>>(Base const& rConfiguration, 
           Type& rType) 
{ 
    return rConfiguration; 
} 
 
 
struct QSizePolicy 
{ 
    enum { HSize = 6, HMask = 0x3f, VMask = HMask << HSize }; 
 
    enum SizeType { Fixed = 0 }; 
 
    SizeType verData() const { return (SizeType)( (data & VMask) >> HSize ); } 
 
    void setVerData( SizeType d ) { data = (unsigned int)(data & ~(HMask << 
HSize)) | 
        (d << HSize); } 
 
    unsigned int data; 
}; 
 
It compiles with g++ < 4.0. 
 
 
Cheers, 
André

-- 
           Summary: error: 'QSizePolicy::<anonymous enum>' uses anonymous
                    type
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Woebbeking at web dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-05-06 20:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-12 18:46 [Bug c++/19404] New: error: 'QSizePolicy::<anonymous enum>' uses anonymous type Woebbeking at web dot de
2005-01-12 18:53 ` [Bug c++/19404] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-01-12 20:35 ` [Bug c++/19404] [4.0 Regression] anonymous types and templates and rejecting valid code pinskia at gcc dot gnu dot org
2005-01-31  6:22 ` mmitchel at gcc dot gnu dot org
2005-04-08 14:36 ` lars at trolltech dot com
2005-04-08 15:34 ` mark at codesourcery dot com
2005-04-08 16:35 ` lars at trolltech dot com
2005-04-27  9:15 ` pcarlini at suse dot de
2005-05-06 20:16 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).