This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] More type fallout


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]