This macro does nothing for now. It is being added in this separate
commit to lessen the number of differences in the future commit that
will need it, so that these don't distract from the main intent of that
commit.
The code is moving away from emitting all warnings in the code
generation pass, to emitting them as soon as encountered. But to avoid
emitting them more than once should the pattern have to be reparsed,
they will not be emitted unless the parse has gotten further this time
than it got earlier. This commit prepares for that.
#define TO_OUTPUT_WARNINGS(loc) \
(PASS2 && RExC_copy_start_in_constructed)
#define TO_OUTPUT_WARNINGS(loc) \
(PASS2 && RExC_copy_start_in_constructed)
+#define UPDATE_WARNINGS_LOC(loc) NOOP
+
#define _WARN_HELPER(loc, warns, code) \
STMT_START { \
if (! RExC_copy_start_in_constructed) { \
#define _WARN_HELPER(loc, warns, code) \
STMT_START { \
if (! RExC_copy_start_in_constructed) { \
} \
if (TO_OUTPUT_WARNINGS(loc)) { \
code; \
} \
if (TO_OUTPUT_WARNINGS(loc)) { \
code; \
+ UPDATE_WARNINGS_LOC(loc); \
to exact spot of failure */
vFAIL(error_msg);
}
to exact spot of failure */
vFAIL(error_msg);
}
+ UPDATE_WARNINGS_LOC(p - 1);
ender = result;
if (ender > 0xff) {
REQUIRE_UTF8(flagp);
ender = result;
if (ender > 0xff) {
REQUIRE_UTF8(flagp);
to exact spot of failure */
vFAIL(error_msg);
}
to exact spot of failure */
vFAIL(error_msg);
}
+ UPDATE_WARNINGS_LOC(p - 1);
ender = result;
if (ender < 0x100) {
ender = result;
if (ender < 0x100) {
case 'c':
p++;
ender = grok_bslash_c(*p, TO_OUTPUT_WARNINGS(p));
case 'c':
p++;
ender = grok_bslash_c(*p, TO_OUTPUT_WARNINGS(p));
+ UPDATE_WARNINGS_LOC(p);
p++;
break;
case '8': case '9': /* must be a backreference */
p++;
break;
case '8': case '9': /* must be a backreference */
SvREFCNT_dec_NN(msg);
}
}
SvREFCNT_dec_NN(msg);
}
}
+
+ if (! return_posix_warnings) {
+ UPDATE_WARNINGS_LOC(RExC_parse);
+ }
if (! valid) {
vFAIL(error_msg);
}
if (! valid) {
vFAIL(error_msg);
}
+ UPDATE_WARNINGS_LOC(RExC_parse - 1);
}
non_portable_endpoint++;
break;
}
non_portable_endpoint++;
break;
if (! valid) {
vFAIL(error_msg);
}
if (! valid) {
vFAIL(error_msg);
}
+ UPDATE_WARNINGS_LOC(RExC_parse - 1);
}
non_portable_endpoint++;
break;
case 'c':
value = grok_bslash_c(*RExC_parse, TO_OUTPUT_WARNINGS(RExC_parse));
}
non_portable_endpoint++;
break;
case 'c':
value = grok_bslash_c(*RExC_parse, TO_OUTPUT_WARNINGS(RExC_parse));
+ UPDATE_WARNINGS_LOC(RExC_parse);
RExC_parse++;
non_portable_endpoint++;
break;
RExC_parse++;
non_portable_endpoint++;
break;