pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:1:
/* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: program.c,v 1.
708
2008/05/29
12
:
36
:
35
grubba Exp $
+
|| $Id: program.c,v 1.
709
2008/05/29
16
:
32
:
55
grubba Exp $
*/ #include "global.h" #include "program.h" #include "object.h" #include "dynamic_buffer.h" #include "pike_types.h" #include "stralloc.h" #include "las.h" #include "lex.h"
pike.git/src/program.c:8667:
{ struct pike_string *attr; struct svalue *a, *b; struct compilation *c = THIS_COMPILATION; struct pike_string *deprecated_string; get_all_args("pop_type_attribute", args, "%W%*%*", &attr, &a, &b); if (Pike_compiler->compiler_pass == 2) { MAKE_CONST_STRING(deprecated_string, "deprecated");
-
if (attr == deprecated_string) {
+
if (
(
attr == deprecated_string)
&&
+
!(c->lex.pragmas & ID_NO_DEPRECATION_WARNINGS))
{
push_int(REPORT_WARNING); ref_push_string(c->lex.current_file); push_int(c->lex.current_line); push_constant_text("type_check"); push_constant_text("Using deprecated %O value."); push_svalue(a); apply_current(PC_REPORT_FUN_NUM, 6); args++; } }
pike.git/src/program.c:8713:
{ struct pike_string *attr; struct svalue *a, *b; struct compilation *c = THIS_COMPILATION; struct pike_string *deprecated_string; get_all_args("push_type_attribute", args, "%W%*%*", &attr, &a, &b); if (Pike_compiler->compiler_pass == 2) { MAKE_CONST_STRING(deprecated_string, "deprecated");
-
if (attr == deprecated_string &&
+
if (
(
attr == deprecated_string
)
&&
+
!(c->lex.pragmas & ID_NO_DEPRECATION_WARNINGS) &&
!((a->type == PIKE_T_TYPE) && (a->u.type == zero_type_string))) { /* Don't warn about setting deprecated values to zero. */ push_int(REPORT_WARNING); ref_push_string(c->lex.current_file); push_int(c->lex.current_line); push_constant_text("type_check"); push_constant_text("Using deprecated %O value."); push_svalue(b); apply_current(PC_REPORT_FUN_NUM, 6); args++;
pike.git/src/program.c:8773:
struct pike_string *attr; struct svalue *a, *b = NULL; struct compilation *c = THIS_COMPILATION; struct pike_string *deprecated_string; get_all_args("apply_type_attribute", args, "%W%*.%*", &attr, &a, &b); if (Pike_compiler->compiler_pass == 2) { MAKE_CONST_STRING(deprecated_string, "deprecated"); if ((attr == deprecated_string) &&
+
!(c->lex.pragmas & ID_NO_DEPRECATION_WARNINGS) &&
(!b || ((b->type == T_INT) && (b->subtype == NUMBER_UNDEFINED) && (!b->u.integer)))) { push_int(REPORT_WARNING); ref_push_string(c->lex.current_file); push_int(c->lex.current_line); push_constant_text("type_check"); push_constant_text("Calling a deprecated value."); apply_current(PC_REPORT_FUN_NUM, 5); args++;