prototype missing in pt.c

Peter Schmid schmid@ltoi.iap.physik.tu-darmstadt.de
Wed Dec 17 17:17:00 GMT 1997


While building the c++-compiler I get the following warnings:

stage1/xgcc -Bstage1/ -c  -DIN_GCC   -DUSE_GNULIBC_1 -g -O2     -I. -I.. -I. -I
./.. -I./../config pt.c
pt.c: In function `coerce_template_parms':
pt.c:1079: warning: assignment makes pointer from integer without a cast
pt.c: At top level:
pt.c:2044: warning: `maybe_fold_nontype_arg' was declared implicitly `extern' and later `static'
pt.c:1079: warning: previous declaration of `maybe_fold_nontype_arg'
pt.c:2044: warning: type mismatch with previous implicit declaration
pt.c:1079: warning: previous implicit declaration of `maybe_fold_nontype_arg'
pt.c:2044: warning: `maybe_fold_nontype_arg' was previously implicitly declared
 to return `int'
pt.c:2044: warning: `maybe_fold_nontype_arg' was declared implicitly `extern' 
and later `static'

Adding  the prototype 
static tree maybe_fold_nontype_arg PROTO((tree));
silences these warnings.
Peter Schmid

*** gcc/cp/pt.c~	Thu Dec 11 01:03:15 1997
--- gcc/cp/pt.c	Thu Dec 18 02:07:29 1997
*************** static int  type_unification_real PROTO(
*** 82,87 ****
--- 82,88 ----
  					 int, int, int));
  static int processing_explicit_specialization PROTO((int));
  static void note_template_header PROTO((int));
+ static tree maybe_fold_nontype_arg PROTO((tree));
  
  /* Restore the template parameter context. */
  




More information about the Gcc-bugs mailing list