pike.git/src/program.c:5850: Inside #if defined(PROFILING)
#ifdef PROFILING
fun.self_time=0;
fun.num_calls=0;
fun.recur_depth=0;
fun.total_time=0;
#endif
/* If this is an lfun, match against the predefined type. */
if ((lfun_type = low_mapping_string_lookup(lfun_types, name))) {
+ int orig_pragmas = c->lex.pragmas;
#ifdef PIKE_DEBUG
if (TYPEOF(*lfun_type) != T_TYPE) {
Pike_fatal("Bad entry in lfun_types for key \"%s\"\n", name->str);
}
#endif /* PIKE_DEBUG */
-
+ /* Inhibit deprecation warnings during the comparison. */
+ c->lex.pragmas |= ID_NO_DEPRECATION_WARNINGS;
if (!pike_types_le(type, lfun_type->u.type)) {
int level = REPORT_NOTICE;
if (!match_types(type, lfun_type->u.type)) {
level = REPORT_ERROR;
} else if (c->lex.pragmas & ID_STRICT_TYPES) {
level = REPORT_WARNING;
}
if (level != REPORT_NOTICE) {
yytype_report(level, NULL, 0, lfun_type->u.type,
NULL, 0, type, 0,
"Type mismatch for callback function %S:", name);
}
}
-
+ c->lex.pragmas = orig_pragmas;
} else if (((name->len > 3) &&
(index_shared_string(name, 0) == '`') &&
(index_shared_string(name, 1) == '-') &&
(index_shared_string(name, 2) == '>')) ||
((name->len > 1) &&
(index_shared_string(name, 0) == '`') &&
((index_shared_string(name, 1) >= 256) ||
isidchar(index_shared_string(name, 1))))) {
/* Getter setter. */
struct pike_string *symbol = NULL;
pike.git/src/program.c:5901:
/* fprintf(stderr, "Got setter: %s\n", name->str); */
gs_type = lfun_setter_type_string;
is_setter = 1;
symbol = string_slice(name, delta, name->len-(delta+1));
symbol_type = get_argument_type(type, 0);
}
if (symbol) {
/* We got a getter or a setter. */
struct reference *ref;
+ int orig_pragmas = c->lex.pragmas;
+ /* Inhibit deprecation warnings during the comparison. */
+ c->lex.pragmas |= ID_NO_DEPRECATION_WARNINGS;
if (!pike_types_le(type, gs_type)) {
int level = REPORT_NOTICE;
if (!match_types(type, gs_type)) {
level = REPORT_ERROR;
} else if (c->lex.pragmas & ID_STRICT_TYPES) {
level = REPORT_WARNING;
}
yytype_report(level, NULL, 0, gs_type,
NULL, 0, type, 0,
"Type mismatch for callback function %S:", name);
}
-
+ c->lex.pragmas = orig_pragmas;
if (flags & ID_VARIANT) {
my_yyerror("Variants not supported for getter/setters: %S", name);
flags &= ~ID_VARIANT;
}
i = isidentifier(symbol);
if ((i >= 0) &&
!((ref = PTR_FROM_INT(prog, i))->id_flags & ID_INHERITED)) {
/* Not an inherited symbol. */
struct identifier *id = ID_FROM_INT(prog, i);
if (!IDENTIFIER_IS_VARIABLE(id->identifier_flags)) {