Description

10 FILE SCOPE VARIABLE DECLARATIONS AND STORAGE-CLASS SPECIFIERS

We’ll wrap up Part I by implementing a few important features related to function and variable declarations. We’ll add support for variable declarations at file scope—that is, at the top level of a source file—and introduce the static and extern keywords. These keywords are storage-class specifiers that control a declaration’s linkage and the storage duration of the declared object (how long that object exists in memory).

We’ll spend most of this chapter on the ...

Get Writing a C Compiler now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.