On Sat, 16 Aug 2014, Patrick Palka wrote:

> 2014-08-17  Patrick Palka  ppa...@gcc.gnu.org
> 
>       * c-typeck.c (build_c_cast): Do a conversion even when the
>       TYPE_MAIN_VARIANTs are the same.
> 
> 2014-08-17  Patrick Palka  ppa...@gcc.gnu.org
> 
>       * gcc.dg/pr13519-1.c: Adjust.

OK, although there's the question of whether typeof and __auto_type should 
remove all qualifiers even from lvalue arguments (at present they do this 
only if the argument is _Atomic-qualified).  (The _Generic implementation 
takes care to remove all qualifiers, although DR#423 has yet to be 
resolved.  But the intended committee direction appears to be along the 
lines you implement - the cast always yields a value of unqualified type. 
We may need to wait for a resolution of the DR to see exactly what's 
needed regarding functions returning qualified types.)

GCC doesn't increase the size of a type when an _Atomic qualifier is 
added, so the presence or absence of qualifiers on the type of an rvalue 
doesn't affect sizeof (although it can affect the GNU extension of 
applying alignof to an expression, I suppose).

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to