Bug 489753 - preprocessor error invalid character ' ' in raw string delimiter
preprocessor error invalid character ' ' in raw string delimiter
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-11 13:42 EDT by Jochen Roth
Modified: 2009-03-11 14:52 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-11 14:10:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
testcase (21 bytes, text/plain)
2009-03-11 13:42 EDT, Jochen Roth
no flags Details

  None (edit)
Description Jochen Roth 2009-03-11 13:42:45 EDT
Created attachment 334840 [details]
testcase

Description of problem:
The following code

---------------
#define R "r"

R"bx"
---------------

causes gcc-4.4.0-0.23.x86_64 (cpp-4.4.0-0.23.x86_64) to print the following error message when compiling with

gcc -E test.c --std=gnu99
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.c"
test.c:3:1: error: invalid character '
' in raw string delimiter

R"bx"

It works without specifying the --std=gnu99 option though. 
It also works with the upstream gcc 4.4 and with 4.3 gcc versions on different platforms.


Version-Release number of selected component (if applicable):
gcc-4.4.0-0.23.x86_64

How reproducible:
Always

Steps to Reproduce:
1.gcc -E test.c --std=gnu99
  
Actual results:
Preprocessor error message

Expected results:
No error message
Comment 2 Jochen Roth 2009-03-11 14:31:04 EDT
Jakub,
thanks for the quick response.
Comment 3 Jakub Jelinek 2009-03-11 14:52:51 EDT
BTW, if you want to avoid a raw-string literal (which would be
e.g. R"[bx]" or R"a[bx]a"), just separate R from " with some whitespace.

Note You need to log in before you can comment on or make changes to this bug.