DigiNews

Tech Watch by Johan Denoyer

← Back to articles

sizeof is surprisingly difficult to parse in c

Quality: 7/10 Relevance: 9/10

Summary

The article explains the tricky parsing rules for C's sizeof operator, with examples demonstrating the difference between expressions and parenthesized types, as well as the impact of compound literals. It discusses parsing strategies and backtracking challenges, and notes how postfix operators complicate a single-pass parser. It also notes that these rules apply to c2y's new _Countof.

🚀 Service construit par Johan Denoyer