[libstdc++/gcc-4.9] missing return statement in basic_regex::assign(basic_regex&&)

Paweł Tomulik ptomulik@meil.pw.edu.pl
Fri Feb 13 13:46:00 GMT 2015


the header file  <bits/regex.h> is missing return statement in the
implementation of basic_regex::assign(basic_regex&&). This is about line
619. The minimal example to reproduce this bug is the following:

#include <regex>
int main()
  std::regex re;
  return EXIT_SUCCESS;

When compiled with clang and run it produces SIGILL:

ptomulik@tea:$ clang++ -std=c++11 -g -O0 -o test test.cpp
ptomulik@tea:$ ./test

I attach patch created with git against the "gcc-4_9_2-release" tag.

Best regards.

Paweł Tomulik, tel. (22) 234 7925
Instytut Techniki Lotniczej i Mechaniki Stosowanej
Politechnika Warszawska

-------------- next part --------------
A non-text attachment was scrubbed...
Name: regex.diff
Type: text/x-patch
Size: 399 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20150213/ac3e122a/attachment.bin>

More information about the Gcc mailing list