Re: #define and (brackets)
- From: Tommy <bad@xxxxxxxxxxxxx>
- Date: Sun, 30 Nov 2008 12:04:50 -0500
Igor Tandetnik wrote:
FWIW, in this case, I happen to agree with you, the parser should
view the macro as a separate token and therefore safe, IN THIS CASE,
to embed a white space. But overall, I think it will cause more harm
than good, and it would be better if the programmer simply made his
macros more concise for the parser to handle.
I never suggested otherwise. This bug is a minor bug in an obscure corner of the language, and is quite easy to work around, with the workaround arguably improving the readability of the program, so a good thing all around. Nevertheless, it's a bug (and I distinctly recall you did argue against that last statement. Perhaps I managed to convince you.)
The only thing you convince me of here is that the C++ standard is strict enough to label existing applications as non-compliant by 100% believers of the document who may use it themselves in their product line. "Hey, we comply, therefore MS should too!"
But it it good to know that you took it upon yourself to better understand the process of the state machine, lexical analysis, strings, tokens, line translations, and single and multi-pass compilers, etc.
Are there any aspects of the C++ standard that are NOT implemented?
Yes. For MSVC compiler, they are documented here:
http://msdn.microsoft.com/en-us/library/x84h5b78.aspx
These are, arguably, known bugs that the vendor doesn't plan to fix in the near future.
So in essence, according to you, the MSVC is a non-compliant, broken C++ compiler and Microsoft can not claim otherwise?
Its funny, you call them bugs, Microsoft says "NonStandard Behavior"
Nonstandard Behavior
The following topics are some of the known places where
the Visual C++ implementation of C++ does not agree with
the C++ standard. The section numbers refer to section
numbers in the C++ standard.
I love the usage of "does not agree" hehehehehehe. :-)
This is exactly what I am taking about. If they were bugs, then one would expect MS to fix them. But if there are no plans to fix them, then obviously, there are MS people who disagree with the C++ standard, and that also translate to users of the product who don't find that to be a problem, enough to escalate the issue.
The only people who will call these BUGS are people who use the C++ standard as a bible who do have an agenda, personal or otherwise.
I don't know about protocol implementors (who seem to have a rather uneasy relationship with their users), but compiler vendors appear to be happy when users report bugs to them. For MSVC compiler, you can do it here:
http://connect.microsoft.com/feedback/default.aspx?SiteID=210
So did you report this "bug?" Any feedback yet?
>> form or another:The question is then does it specifically state in some
> [...]
"Implementators of this C++ standard MUST follow
the parsing protocol 100%"
1.4 Implementation compliance
I will be surprise if it was there
Then, I guess, I've just managed to surprise you.
I did say "parsing protocol 100%" Igor.
What you provided was a generality and that was all it was. But note item #2. The idea of different views was well understood when it said:
Although this International Standard states only
requirements on C++ implementations, those requirements are
often easier to understand if they are phrased as requirements
on programs, parts of programs, or execution of programs.
In other words, don't create further ambiguity by relaxing the guidelines.
What C++ Standard did here was to address what is often considered a problem in the standardization process such as the IETF document process where too much relaxation of the document provisions can and does lead to greater ambiguity and in the case of security, sometimes a huge problem.
I wish you would understand that and not choose to argue it.
In any case, I doubt you will find the same exact 100% same exact parsing protocol follows by all the same way.
That is not the say that an establish vendor will not update his compiler to *better* comply to a standard, but you just never know how one part of the total is deliberately done differently maybe because that is how it was and it was deemed to be better. For whatever reason, they "do not agree" with the C++ standard.
You call that a bug, broken. Others will see that differently, like MS calls it "Nonstandard Behavior."
--
.
- Follow-Ups:
- Re: #define and (brackets)
- From: Igor Tandetnik
- Re: #define and (brackets)
- References:
- #define and (brackets)
- From: Gerry Hickman
- Re: #define and (brackets)
- From: David Webber
- Re: #define and (brackets)
- From: Alan Carre
- Re: #define and (brackets)
- From: Igor Tandetnik
- Re: #define and (brackets)
- From: Alan Carre
- Re: #define and (brackets)
- From: Alan Carre
- Re: #define and (brackets)
- From: Igor Tandetnik
- Re: #define and (brackets)
- From: Alan Carre
- Re: #define and (brackets)
- From: Igor Tandetnik
- Re: #define and (brackets)
- From: Alan Carre
- Re: #define and (brackets)
- From: Igor Tandetnik
- Re: #define and (brackets)
- From: Tommy
- Re: #define and (brackets)
- From: Alexander Grigoriev
- Re: #define and (brackets)
- From: Tommy
- Re: #define and (brackets)
- From: Igor Tandetnik
- Re: #define and (brackets)
- From: Tommy
- Re: #define and (brackets)
- From: Igor Tandetnik
- #define and (brackets)
- Prev by Date: Re: Simple question on Pointers
- Next by Date: Re: Simple question on Pointers
- Previous by thread: Re: #define and (brackets)
- Next by thread: Re: #define and (brackets)
- Index(es):
Relevant Pages
|