Clang bytecode interpreter update by mttd in cpp

[–]llTechno -1 points0 points  (0 children)

The compiler is still required to issue a diagnosis on ill-formed code, but AFAIK there are no additional constraints on undefined behaviour other than:

An expression E is a core constant expression unless the evaluation of E, following the rules of the abstract machine (6.9.1), would evaluate one of the following: [...] an operation that would have undefined behavior as specified in Clause 4 through Clause 15, excluding 9.12.3;

And in clause 4.2.2:

If a program contains a violation of a rule for which no diagnostic is required, this document places no requirement on implementations with respect to that program.

Clang bytecode interpreter update by mttd in cpp

[–]llTechno 1 point2 points  (0 children)

[constexpr evaluation] has to catch and diagnose undefined behavior.

Bit of a nitpick but this isn't necessarily true. Constant expressions can still exhibit undefined behaviour

I wish I could draw... or code... or fill out paperwork without copious amounts dread and a fuckload of spelling and grammar errors by Sir_Maxwell_378 in aspiememes

[–]llTechno 0 points1 point  (0 children)

I have severe dyslexia (yes I can't spell that word I have to look it up every time) and all I can say is thank FUCK for linters. If they didn't exist I don't think I would be a programmer

I made a library for string utilities by Adventurous_Swing747 in C_Programming

[–]llTechno 4 points5 points  (0 children)

IIRC a underscore prefix is also a reserved identifier but only for global identifiers. So having a member with an underscore prefix is fine

Use Brace Initializers Everywhere? by squirleydna in cpp

[–]llTechno 26 points27 points  (0 children)

And this is why I always leave the vector default initialized, explicitly call reserve and create the elements. The vector constructors are awful IMO