Web lists-archives.com

[GCC] C++ program calling std::getline() crashes with certain compilation flags




> Bonus points if you can reduce this testcase further, see
> https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
> for how to take the preprocessed output and automatically
> reduce it to a much smaller file.

I attach the output of
  ```
  creduce checki.sh test_getline.i
  ```
where checki.sh is attached too and test_getline.i was obtained trough
  ```
  g++ -w -std=c++98 -O0 -E -P test_getline.cxx > test_getline.i
  ```
Note that passing -O1 instead of -O0 doesn't change the pre-processed output,
while replacing -std=c++98 by -std=gnu++98 triggers substantial changes.

Falk

Attachment: test_getline.i
Description: test_getline.i

Attachment: checki.sh
Description: checki.sh

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple