Hello,

On Wed, 20 Mar 2019, Devin Hussey wrote:

> I pushed to the _Alignas_and_Noreturn:mob branch with my changes.
> 
> - _Noreturn: complete. It does nothing, but the standard doesn't say
> it has to do anything.
> - stdnoreturn.h: complete(ly pointless), but implemented.
> - _Alignas: partial: It only works on integers for now, it doesn't
> support _Alignas(type) yet.
> - stdalign.h: I'm not implementing it until _Alignas is complete.

Many thanks for the patch.  Two comments: apart from the TODO it accepts 
_Alignas in wrong places, namely as part of a pointer declarator.  That 
isn't correct, after the '*' only type qualifiers 
(const,restrict,volatile,_Atomic) should be accepted.

I.e. with your patch this is accepted:

void * _Alignas(16) p1;

whereas it shouldn't.  The addition to type_decl() doesn't need 
to be there.

As for the TODO item, a structure like in parse_expr_type() would work, 
just instead of calling expr_type in the !type case you'd call expr_const.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to