[PATCH 3/3] contrib: Add dg-out-generator.pl
Arsen Arsenović
arsen@aarsen.me
Thu Dec 22 21:56:29 GMT 2022
Hi,
Jason Merrill <jason@redhat.com> writes:
>> + # Newlines should be more tolerant.
>> + s/\n$/(\\n|\\r\\n|\\r)*/;
>
> Isn't specifically handling \\r\\n redundant with the * operator?
To the extent of my knowledge, yes; I left that in since the original
tests I was replacing with this script also used this terminator:
-// { dg-output "default std::handle_contract_violation called: .*.C 21 test<double>::fun .*(\n|\r\n|\r)*" }
+// { dg-output {contract violation in function test<double>::fun at .*:21: b > 0(\n|\r\n|\r)*} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)*} }
That could easily use the simpler [\r\n]* form too:
% regexp {^[\r\n]*$} "\r\n\n\n"
1
Feel free to swap that in too.
Thanks, have a great night.
--
Arsen Arsenović
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 381 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20221222/c6b63636/attachment-0001.sig>
More information about the Libstdc++
mailing list