P
pmp
free online test of c/c++ try now http://www.itworld2.com
Richard Heathfield said:If you take away all the registration stuff, I'll be glad to take a
look at it.
Kenneth Brody said:It depends on the definition of "c".
For example, given the definition "const int c;", the expression
"c/c++" is well defined. (FSVO "defined".)
Keith said:It's a constraint violation. The only requirement on the
implementation is that it must produce a diagnostic.
Once it's
produced that diagnostic, it's free to continue to translate the
program, which may then execute but whose behavior is not defined
by the standard.
Flash Gordon said:Which, of course, is the 'VI "defined"' to hich Kenneth was referring.
True, but it's defined as producing a diagnostic during translation.
Kenneth Brody said:Thanks.
This group thrives on pedantry.
Okay, what about:
extern void c(void);
Are we in the realm of "must fail to compile" yet?
Kenneth Brody said:That's what I remembered after clicking "send". :-|
(And, of course, macros can't expand to preprocessor directives.)
So, technically, syntax rule violations are also UB? (Can a compiler
print a diagnostic and then reformat the hard drive, and still be
"conforming"?)
Kenneth Brody said:That's what I remembered after clicking "send". :-|
(And, of course, macros can't expand to preprocessor directives.)
So, technically, syntax rule violations are also UB? (Can a compiler
print a diagnostic and then reformat the hard drive, and still be
"conforming"?)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.