🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6050

Re: Bug in gcc 2.7.2 on platform alpha-dec-osf3.2

#6050
From: Alexandre Oliva
Date: Wed, 11 Dec 1996 00:00
30 lines
1523 bytes
Randy Smith writes:

> main(int argc, char **argv)
> {
>     A a;
>     B &b = static_cast<B&>(a);
> }

>   does *not* produce any error messages, where I believe that it
>   should.

That's right.

>   This looks like a bug to me, but I would also welcome someone
>   explaining to me why it isn't.

This is a bug, indeed, but it is a bug in g++ frontend, not in gcc, so
it should have been submitted to bug-g++.  Anyway, you need not bother
submitting it again, because the current development snapshot does
produce an error message, so the bug should be fixed when gcc/g++
2.8.0 is released.  It should produce the following error message:

test.cc: In function `int main(int, char **)':
test.cc:23: cannot convert type `A' to type `B &'

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br
Universidade Estadual de Campinas, SP, Brasil
Technical Details
Message-ID: <orwwuou66z.fsf@dcc.unicamp.br>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <9612102059.AA03747@mordor.osf.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,8d0d9ab0725227ef
X-Google-Attributes: gid113d02,public
From: oliva@dcc.unicamp.br (Alexandre Oliva)
Subject: Re: Bug in gcc 2.7.2 on platform alpha-dec-osf3.2
Date: 1996/12/11
Message-ID: <orwwuou66z.fsf@dcc.unicamp.br>
X-Deja-AN: 203565933
sender: bug-gcc-request@prep.ai.mit.edu
references: <9612102059.AA03747@mordor.osf.org>
content-type: text/plain; charset=US-ASCII
organization: IC - UNICAMP - Campinas, SP, Brazil
x-gateway: relay3.UU.NET from bug-gcc to gnu.gcc.bug; Wed, 11 Dec 1996 16:24:24 EST
mime-version: 1.0 (generated by tm-edit 7.96)
newsgroups: gnu.gcc.bug