Article View: gnu.g++.bug
Article #202Incorrect 'conversion to reference of read-only variable' error
From: Ulrich Windl
Date: Fri, 10 Apr 1992 12:05
Date: Fri, 10 Apr 1992 12:05
19 lines
1374 bytes
1374 bytes
> Arraychar.c:291: conversion to reference of read-only variable `nil' > > Here g++ should quietly cast away nil's const-ness. I think it should NOT, because there's a good reason: If you tell the compiler that a variable (nil) is to be const. In most cases it is an error if you cast away const-ness. Furthermore it make the code optimizer less efficient. Maybe the compiler should warn, but what's a constant, if you can change it? ---------------------------------------- Ulrich Windl Universitaet Regensburg Rechenzentrum D-W8400 Regensburg --- X.400: windl@vax1.informatik.fh-regensburg.dbp.de (VAX/VMS soon invalid) (Maybe you'll have to leave out ".dbp") SMTP: c9524@rrzc1.rz.uni-regensburg.de (Sun, my favorite) SMTP: uw@ngate.rzi.uni-regensburg.de (PC, Pegasus Mail)
Technical Details
Message-ID:
<9204100805.AA16361@rrzc1.rz.uni-regensburg.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!rrzc1.rz.uni-regensburg.de!c9524References:
<1992Apr3.092315.28243@muddcs.claremont.edu>Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!rrzc1.rz.uni-regensburg.de!c9524 From: c9524@rrzc1.rz.uni-regensburg.de (Ulrich Windl) Subject: Incorrect 'conversion to reference of read-only variable' error Message-ID: <9204100805.AA16361@rrzc1.rz.uni-regensburg.de> Sender: gnulists@ai.mit.edu Reply-To: c9524@rrzc1.rz.uni-regensburg.de Organization: GNUs Not Usenet References: <1992Apr3.092315.28243@muddcs.claremont.edu> Distribution: gnu Date: Fri, 10 Apr 1992 12:05:08 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 20