Branch: Tag:

2008-05-24

2008-05-24 15:14:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler messaging mega patch.
va_yyreport() is now the main C-level dispatcher for compiler messages.
It also handles the automatic conversion of type errors to warnings in compat mode.
Consolidated the location for the implementation of most of the yy*-messaging functions to program.c.
Added yytype_report().
Changed APIs for yyexplain_*().
Moved the definitions of REPORT_* from pike_compiler.h to program.h.
va_yyerror() and low_yyerror() are no more.
Most type-system messages should now be marked with the appropriate subsystem.
Reenabled the typechecking for sscanf and sprintf() now that errors are converted into warnings in compat mode.

Rev: src/language.yacc:1.425
Rev: src/las.c:1.413
Rev: src/las.h:1.79
Rev: src/modules/sprintf/sprintf.c:1.153
Rev: src/pike_compiler.h:1.14
Rev: src/pike_types.c:1.337
Rev: src/pike_types.h:1.118
Rev: src/program.c:1.702
Rev: src/program.h:1.248
Rev: src/sscanf.c:1.184

2:   || 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: pike_types.h,v 1.117 2008/05/17 22:48:33 grubba Exp $ + || $Id: pike_types.h,v 1.118 2008/05/24 15:14:12 grubba Exp $   */      #ifndef PIKE_TYPES_H
284:   void gc_check_type (struct pike_type *t);   void gc_check_all_types (void);   int type_may_overload(struct pike_type *type, int lfun); - void yyexplain_nonmatching_types(struct pike_type *type_a, -  struct pike_type *type_b, -  int flags); + void yyexplain_nonmatching_types(int severity_level, +  struct pike_string *a_file, +  INT32 a_line, +  struct pike_type *type_a, +  struct pike_string *b_file, +  INT32 b_line, +  struct pike_type *type_b);   struct pike_type *debug_make_pike_type(const char *t);   struct pike_string *type_to_string(struct pike_type *t);   int pike_type_allow_premature_toss(struct pike_type *type);