|
Message-ID: <20240421122358.33440bcb@inria.fr> Date: Sun, 21 Apr 2024 12:23:58 +0200 From: Jₑₙₛ Gustedt <jens.gustedt@...ia.fr> To: Markus Wichmann <nullplan@....net> Cc: musl@...ts.openwall.com Subject: Re: Alignment attribute in headers Markus, on Sun, 21 Apr 2024 09:38:38 +0200 you (Markus Wichmann <nullplan@....net>) wrote: > Am Sun, Apr 21, 2024 at 09:16:05AM +0200 schrieb Jₑₙₛ Gustedt: > > Since this is unified starting with C23 and I think we morally > > should have C conformance first and fallbacks only if imperatively > > needed I would go for > > > > Ugh. Let the bike shedding begin. I will tell you that moral arguments > about software don't make a lot of sense to me, though. I am not a native speaker, but I think this is generally used as figure of speech for "there got reasons to do something". > > #if __STDC_VERSION >= 202311L || __cplusplus >= 201100L > > /* use alignas */ > > #elif __STDC_VERSION >= 201100L > > /* use _Alignas */ > > #elif __GNUC__ > > /* use attribute */ > > #endif > > > > Did you not read the part about the GCC version that claims C11 > conformance but doesn't have _Alignas? Yes, that's a bug. Yes, it was > fixed. No, musl can't break compatibility with it. ah, sorry then how about #if __GNUC__ /* or ifdef if preferable for some reason */ /* use gcc attribute */ #elif __STDC_VERSION >= 202311L || __cplusplus >= 201100L /* use alignas */ #elif __STDC_VERSION >= 201100L /* use _Alignas */ #endif Thanks Jₑₙₛ -- :: ICube :::::::::::::::::::::::::::::: deputy director :: :: Université de Strasbourg :::::::::::::::::::::: ICPS :: :: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus :: :: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 :: :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.