This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix spurious conform test failures
- From: Zack Weinberg <zackw at panix dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 27 Jul 2015 10:53:59 -0400
- Subject: Re: Fix spurious conform test failures
- Authentication-results: sourceware.org; auth=none
- References: <mvmoaix8z6a dot fsf at hawking dot suse dot de>
Since it's not particularly difficult to write a Perl regex that
matches C string constants *with* \-escapes taken into account, can I
suggest we do that now instead of when we trip over it? Also, should
do the same thing for character
constants.
# Discard string and character constants. Since this is preprocessor
# output we need not worry about \-newline or un-terminated strings,
# and since we just need to find the end, we don't need to distinguish
# the various types of \-escapes.
$str =~ s/" (?: [^"\\] | \\. )* "//xg;
$str =~ s/' (?: [^'\\] | \\. )* '//xg;
zw