Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Is enum a suitable way to implement a "local define?"
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="James Kuyper" data-source="post: 5154595"><p><nit-pick> Some address constants (namely, null pointers) can be</p><p></p><p></p><p>"An _address constant_ is a null pointer, a pointer to an lvalue</p><p>designating an object of static storage duration, or a pointer to a</p><p>function designator; ..." (6.6p9). The phrase "address constant" is</p><p>italicised, indicating that this sentence constitutes the definition of</p><p>that phrase.</p><p></p><p>....</p><p></p><p>In C, address constants are not required to be absolute, nor are they</p><p>required to be relocatable - that's an implementation detail outside the</p><p>scope of the C standard.</p><p></p><p></p><p>I think it is - but "obvious" depends upon the reader.</p><p></p><p></p><p>The C standard says otherwise.</p></blockquote><p></p>
[QUOTE="James Kuyper, post: 5154595"] <nit-pick> Some address constants (namely, null pointers) can be "An _address constant_ is a null pointer, a pointer to an lvalue designating an object of static storage duration, or a pointer to a function designator; ..." (6.6p9). The phrase "address constant" is italicised, indicating that this sentence constitutes the definition of that phrase. .... In C, address constants are not required to be absolute, nor are they required to be relocatable - that's an implementation detail outside the scope of the C standard. I think it is - but "obvious" depends upon the reader. The C standard says otherwise. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Is enum a suitable way to implement a "local define?"
Top