DEV Community

Discussion on: Expression-Oriented Programming in C: The FMT Macro

Collapse
 
gabrielfallen profile image
Alexander Chichigin

Great post! It was super interesting to learn about compound literals. Maybe you can comment on restrict everywhere too? Especially applied to array lengths? Thanks! 😃

Collapse
 
hirrolot profile image
Hirrolot • Edited

Thanks for your feedback. Commented on the restrict and static keywords too.

Collapse
 
gabrielfallen profile image
Alexander Chichigin

Do I get it right that these restrict and array length annotations are just promises from a programmer and compiler don't and can't check their actual validity?

Thread Thread
 
hirrolot profile image
Hirrolot

Sort of. Formally, they are promises, though some sane compilers can check a passed array length: hamberg.no/erlend/posts/2013-02-18....

Thread Thread
 
gabrielfallen profile image
Alexander Chichigin

Cool! Thanks. 😃