public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/99446] [11 Regression] ICE in linemap_position_for_loc_and_offset, at libcpp/line-map.c:1005 since r11-6325
Date: Sun, 18 Apr 2021 12:44:48 +0000	[thread overview]
Message-ID: <bug-99446-4-Bqp8LzVxbT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99446-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99446

--- Comment #13 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Hi Nathan,

I've been playing with a variant of c-c++-common/raw-string-6.c
with your patch:

$ cat raw-string-6.c
$ cat raw-string-6.c 
// { dg-do compile }
// { dg-options "-std=gnu99" { target c } }
// { dg-options "-std=c++0x" { target c++ } }

#include "xxxx.h"
$ cat xxxx.h 
const void *s0 = R"ouch()ouCh";
$ gcc -x c raw-string-6.c
In file included from raw-string-6.c:5:
xxxx.h:1:18: error: unterminated raw string
    1 | const void *s0 = R"ouch()ouCh";
      |                  ^
raw-string-6.c:6: error: expected expression at end of input
$ gcc -x c++ raw-string-6.c 
In file included from raw-string-6.c:5:
xxxx.h:1:18: error: unterminated raw string
    1 | const void *s0 = R"ouch()ouCh";
      |                  ^
xxxx.h:1:16: error: expected primary-expression at end of input
    1 | const void *s0 = R"ouch()ouCh";
      |                ^

Do you agree that the C++ FE places the error about the end of input
on a somewhat surprising place?


Bernd.

      parent reply	other threads:[~2021-04-18 12:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07 10:27 [Bug preprocessor/99446] New: [11 Regression] ICE in linemap_position_for_loc_and_offset, at libcpp/line-map.c:1005 doko at debian dot org
2021-03-08  8:44 ` [Bug preprocessor/99446] " marxin at gcc dot gnu.org
2021-03-08  8:58 ` rguenth at gcc dot gnu.org
2021-03-17 11:51 ` sbergman at redhat dot com
2021-03-17 15:33 ` sbergman at redhat dot com
2021-04-08 13:02 ` rguenth at gcc dot gnu.org
2021-04-08 13:03 ` rguenth at gcc dot gnu.org
2021-04-08 13:05 ` rguenth at gcc dot gnu.org
2021-04-08 13:20 ` [Bug preprocessor/99446] [11 Regression] ICE in linemap_position_for_loc_and_offset, at libcpp/line-map.c:1005 since r11-6325 jakub at gcc dot gnu.org
2021-04-12 10:11 ` bernd.edlinger at hotmail dot de
2021-04-12 13:16 ` nathan at gcc dot gnu.org
2021-04-12 13:46 ` bernd.edlinger at hotmail dot de
2021-04-12 14:11 ` nathan at gcc dot gnu.org
2021-04-13 12:07 ` cvs-commit at gcc dot gnu.org
2021-04-13 12:08 ` nathan at gcc dot gnu.org
2021-04-18 12:44 ` bernd.edlinger at hotmail dot de [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99446-4-Bqp8LzVxbT@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).