This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/623: gcc 20001008 rejects {...} component initialization



>Number:         623
>Category:       c++
>Synopsis:       gcc 20001008 rejects {...} component initialization
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 09 00:46:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Bangerth
>Release:        unknown-1.0
>Organization:
>Environment:
gcc 2.97 20001002 and 20001008
>Description:
The 20001002/20001008 snapshots rejects the following, legal code:
-----------------------------
struct V {};
struct X {   V v;   };

const X x = { V() };
-----------------------------
The error message is 
    var/xt> c++ -c y.cc 
    y.cc: In function `void __static_initialization_and_destruction_0(int, int)':
    y.cc:4: non-lvalue in unary `&'
which is neither helpful nor correct. If the `const' specifier
is removed from the variable, everything is fine.
>How-To-Repeat:
Compile with `c++ -c y.cc'
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]