This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

c++/9442: false error: non-lvalue in unary `&'


>Number:         9442
>Category:       c++
>Synopsis:       false error: non-lvalue in unary `&'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 26 12:15:59 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Robert Schiele
>Release:        3.4 20030125 (experimental)
>Organization:
>Environment:
System: independent of system
Architecture: independent of architecture
host: independent of host
build: independent of build host
target: independent of target system
configured with: /home/schiele/gcccvs/gcc/configure --enable-threads=posix --prefix=/opt/Pkg/Linux/i686/gcc34 --enable-languages=c,c++,f77,objc --disable-libgcj --with-gxx-include-dir=/opt/Pkg/Linux/i686/gcc34/include/g++ --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
>Description:
The compiler does not compiler:

struct a {
    static const a b;
    a(int);
    operator int();
};

a c() {
    return 0 ? c() : a::b;
}

Instead it says:

# g++ -c test.ii
test.ii: In function `a c()':
test.ii:8: error: non-lvalue in unary `&'
#
>How-To-Repeat:
g++ -c test.ii
>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]