Back to Search
Start Over
Properly define blocks as part of the grammar
- Source :
- [Research Report] N2937, ISO JCT1/SC22/WG14. 2022, pp.3
- Publication Year :
- 2022
- Publisher :
- HAL CCSD, 2022.
-
Abstract
- Blocks are a fundamental concept in C for the definition of visibility scopes of identifiers and for the lifetime of objects. Currently, there is no closed definition what a block is and the different definitions that compose the term have to be collected in different places that spread over several clauses. In particular, the fact that dependent statements of iteration or selection statements form blocks of their own is easily overlooked and leads to misunderstandings for example concerning the lifetime of compound literals. We propose to change that situation by introducing terms primary block and secondary block in the syntax and by referring to the other definitions of blocks, namely functions definitions and lambda expressions (if added to C23), in a summary definition.
Details
- Language :
- English
- Database :
- OpenAIRE
- Journal :
- [Research Report] N2937, ISO JCT1/SC22/WG14. 2022, pp.3
- Accession number :
- edsair.od......1398..34735eec0952994f627a9c1cf6fc564d