[PATCH] More type fallout
Joseph S. Myers
joseph@codesourcery.com
Thu Jun 2 13:58:00 GMT 2005
On Thu, 2 Jun 2005, Richard Guenther wrote:
> * c-typeck.c (build_indirect_ref): Build INDIRECT_REF
> with correct type.
It should be possible to test this change in conjunction with typeof. For
example,
int *__restrict *p;
void f(void) { __typeof(*p) *q = p; }
should not warn (type qualifiers shouldn't be discarded in typeof). I
don't think this can be detected without typeof since the handling of &*
gets rid of the INDIRECT_REF so gets back the original type, and places
checking for const check for the expression being marked readonly, not
just the type.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)
More information about the Gcc-patches
mailing list