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++
object-like macro used like function-like macro
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
[QUOTE="Victor Bazarov, post: 2549648"] I am fairly perplexed as to your statement about not finding this "case in the standard". Did you expect to find precisely this code or any other explanation to make this legal or not? Where in the Standard did you look? 'FOO' is replaced with 'foo' in the code _following_ the definition of 'FOO' macro. Once the preprocessor is done with the code, you get "void foo(int){}int main(){foo(0);return 0;}" (I left the spaces where needed to separate the preprocessor tokens). What's invalid about that code? And what is "object-like macro" you're referring to in your subject line? V [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
object-like macro used like function-like macro
Top