Effective type
An effective type is the C type through which an object may be accessed under the language’s object-access rules.
Modern C, Third Edition
An effective type is the type that C associates with storage allocated without a declared type through the accesses or stores that establish how the storage may be used.
- How it is used
- Constrains pointer-based access to objects in C's memory model and supports aliasing assumptions.
- How deep it goes
- Defines declared, allocated, character, and union cases, then stops short of detailed alias-analysis mechanics.
- Examples
- Uses malloc-backed double storage, unsigned-char inspection, and an incompatible unsigned-pointer dereference.
- What you can do after
- Apply effective-type rules to allocated storage and diagnose incompatible pointer accesses as undefined behavior.
Modern C
An effective type is the C type through which an object is permitted to be accessed under the language's object-access rules.
- How it is used
- Constrains pointer-based object access and supplies the basis for the aliasing rule.
- How deep it goes
- Defines declared, union, character, and allocated-storage cases, but defers the latter's detailed treatment.
- Examples
- Uses an unsigned-char array cast to unsigned* and allocated storage initialized through assignment.
- What you can do after
- Evaluate pointer-based accesses for effective-type violations and recognize when dereferencing leaves program state undefined.
Related concepts
- alignascontrasts with · alignas, also spelled _Alignas, is an alignment specifier that requests a specified alignment for an object or declaration.
- objectused by · A computational object is a runtime entity or structured value representing data, state, or a resource, with properties or operations defined by its programming model.
- compound literalconfigured by · A compound literal is a C expression consisting of a parenthesized type name followed by an initializer that creates an unnamed object.
- union typecontrasts with · A union type is a type whose values can be any one of several specified alternative types or variants.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

