[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] [PATCH]: Add _Noreturn and partial _Alignas support

From: Michael Matz
Subject: Re: [Tinycc-devel] [PATCH]: Add _Noreturn and partial _Alignas support
Date: Mon, 25 Mar 2019 20:45:21 +0000 (UTC)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)


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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]