http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48740
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com>
2011-04-23 10:22:27 UTC ---
(In reply to comment #1)
> Just to note: I found this bug with 4.5.2 originally. I then used 4.6 only to
> check that it wasn't solved in the mean time.
Please always ensure that the defect still exists in the most recent compiler
version, which is 4.7. I verified that 4.7.0 20110422 (experimental) still
contains this warning.
In regard to your questions: Standard C++0x does still contain trigraphs, so a
conforming compiler has to handle them correctly. But any trigraph
transformations that happened within a raw string shall be reverted afterwards,
es clearly expressed in [lex.pptoken] p. 3 b. 1:
"If the next character begins a sequence of characters that could be the prefix
and initial double quote of a raw string literal, such as R", the next
preprocessing token shall be a raw string literal. Between the initial and
final double quote characters of the raw string, any transformations performed
in phases 1 and 2 (trigraphs, universal-character-names, and line splicing) are
reverted; this reversion shall apply before any d-char, r-char, or delimiting
parenthesis is identified."
The most important aspect is to test that this is not just a warning, but that
trigraph transformations have indeed been performed. I can confirm this to
happen with gcc 4.7 200110409 (4.7.0 20110422 version cannot produce executable
programs), so this is clearly not only a false warning.