This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Mismatched types in ADDR_EXPR from c-typeck.c:build_function_call
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paul Schlie <schlie at comcast dot net>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>, <gcc at gcc dot gnu dot org>
- Date: 18 May 2005 20:16:07 +0200
- Subject: Re: Mismatched types in ADDR_EXPR from c-typeck.c:build_function_call
- References: <BEB0E6AD.A311%schlie@comcast.net>
Paul Schlie <schlie@comcast.net> writes:
| > From: Gabriel Dos Reis <gdr@integrable-solutions.net>
| > <rguenth@tat.physik.uni-tuebingen.de>, <gcc@gcc.gnu.org>
| > Subject: Re: Mismatched types in ADDR_EXPR from c-typeck.c:build_function_call
| >
| > | Thereby all literal values are implied to be qualified as a read-only
| > | 'literal' object/reference, which has the semantics, that it may not be
| > | assigned/modified, but unlike 'const' may not be cast away; thereby for
| >
| > If you cast away a const, you're still not allowed to modify the
| > object, so the compiler is still allowed to do the optimization.
| > Notice any type qualifier can be casted away, so introducing one does
| > not solve the problem, it just adds another complexity,
|
| Unless a 'literal' qualifier is defined as being sticky; never "cast away".
Then, it is not a type qualifier. It is something else, like
reference or pointer. But not a type qualifier.
| (Eliminating the complexity associated with having to track and maintain
| READONLY tree attributes distinct from an object's declared qualified type?)
I dunno. I have the impression that you're moving the problem from one
place to another, without reducing complexity.
[...]
| (I'll leave it be, but obviously wanted to try to plant another seed.)
:-)
-- Gaby