Sujet : Re: C23 thoughts and opinions
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 23. May 2024, 21:06:39
Autres entêtes
Organisation : None to speak of
Message-ID : <87y18047jk.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
David Brown <
david.brown@hesbynett.no> writes:
On 23/05/2024 14:11, bart wrote:
[...]
'embed' was discussed a few months ago. I disagreed with the poor
way it was to be implemented: 'embed' notionally generates a list of
comma-separated numbers as tokens, where you have to take care of
any trailing zero yourself if needed. It would also be hopelessly
inefficient if actually implemented like that.
>
Fortunately, it is /not/ actually implemented like that - it is only
implemented "as if" it were like that. Real prototype implementations
(for gcc and clang - I don't know about other tools) are extremely
efficient at handling #embed. And the comma-separated numbers can be
more flexible in less common use-cases.
[...]
I'm aware of a proposed implementation for clang:
https://github.com/llvm/llvm-project/pull/68620https://github.com/ThePhD/llvm-projectI'm currently cloning the git repo, with the aim of building it so I can
try it out and test some corner cases. It will take a while.
I'm not aware of any prototype implementation for gcc. If you are, I'd
be very interested in trying it out.
(And thanks for starting this thread!)
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */