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

            Bug ID: 121833
           Summary: ICE on unterminated raw string with stringify
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stevenxia990430 at gmail dot com
  Target Milestone: ---

The following invalid program reports an internal compiler error: Segmentation
fault. Failed on gcc-trunk. 

To quickly reproduce: https://gcc.godbolt.org/z/YWMaWv8W3
```
#define RAWSTR R##"s"

int main()
{
    auto x = RAWSTR;
    return 0;
}
```

After adding the delimiter (e.g., `#define RAWSTR R##"(s)"`), the program
compiles correctly. Also removing the `##` also leads to no segmentation fault.
  • [Bug c++/121833] New: ICE on... stevenxia990430 at gmail dot com via Gcc-bugs

Reply via email to