This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Array-to-pointer conversion in cast expressions
- From: Matt Austern <austern at apple dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 25 Sep 2002 09:28:35 -0700
- Subject: Re: Array-to-pointer conversion in cast expressions
On Monday, September 23, 2002, at 04:47 PM, Nathan Sidwell wrote:
Matt Austern wrote:
I can't find any justification in the Standard for the compiler to
treat "(P22) a" and "static_cast<P22>(a)" differently. So, the
usual questions:
they are not different.
(2) If the answer to #1 is no: is this a known bug, e.g. one of
may be - is http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3518
related to this array->pointer decay?
Doesn't look obviously related, except that they both involve
standard conversions. Maybe they'll turn out to have
the same fix, but the symptoms don't seem all that similar:
the weird thing about the problem I'm seeing is that the
compiler is treating two different kinds of cast expressions
differently.
Guess I'd better submit this as a new PR, and see if I
can figure out what's going on.
--Matt