home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / gcc / help / 2866 < prev    next >
Encoding:
Text File  |  1993-01-06  |  13.9 KB  |  324 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!cis.ohio-state.edu!vki68.aar-vki.DK!eks
  3. From: eks@vki68.aar-vki.DK (Eigil Krogh Sorensen)
  4. Subject: gcc-2.3.3 error while making groff-1.06
  5. Message-ID: <m0n9Zzn-0000tlC@vki68.aar-vki.dk>
  6. Sender: daemon@cis.ohio-state.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Wed, 6 Jan 1993 11:36:24 GMT
  10. Lines: 312
  11.  
  12.  
  13.  
  14. Now gcc-2.3.3 is installed on this Motorola sysV68 R3V5.1 (mvme147/
  15. 68030 based) system. But I still get the error enclosed (screendump)
  16. when makeing groff-1.06. The same error which came when gcc-2.3.2
  17. was used.
  18.  
  19. The error comes when libgroff/errarg.cc is compiled.
  20.  
  21. I'm not the best in understanding C++. All the files are
  22. enclosed to so that you can se if something's wrong.
  23.  
  24. Is it possible to give any hints about what is wrong and what I
  25. can do about it.
  26.  
  27.  
  28. Best,
  29. Eigil Krogh Sorensen.
  30.  
  31.  
  32.  
  33. --------------------------------------------------------------------
  34. Screendump of error ("vki68 eks $" is prompt).
  35. -----------------------------------------------
  36.  
  37. make
  38. Making all in include
  39. Making all in libgroff
  40.         gcc -O2 -v -I. -I. -I../include -I./../include -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork   -c assert.cc
  41. Reading specs from /usr/local/lib/gcc-lib/3300/2.3.3/specs
  42. gcc version 2.3.3
  43.  /usr/local/lib/gcc-lib/3300/2.3.3/cpp -lang-c++ -v -I. -I. -I../include -I./../include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dm68k -Dunix -DsysV68 -D__m68k__ -D__unix__ -D__sysV68__ -D__m68k -D__unix -D__sysV68 -D__OPTIMIZE__ -D__HAVE_68881__ -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork assert.cc /usr/tmp/cca20792.i
  44. GNU CPP version 2.3.3 (68k, SGS/AT&T sysV68 syntax)
  45.  /usr/local/lib/gcc-lib/3300/2.3.3/cc1plus /usr/tmp/cca20792.i -quiet -dumpbase assert.cc -O2 -version -o /usr/tmp/cca20792.s
  46. GNU C++ version 2.3.3 (68k, SGS/AT&T sysV68 syntax) compiled by GNU C version 2.3.3.
  47.  as -o assert.o /usr/tmp/cca20792.s
  48.         gcc -O2 -v -I. -I. -I../include -I./../include -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork   -c change_lf.cc
  49. Reading specs from /usr/local/lib/gcc-lib/3300/2.3.3/specs
  50. gcc version 2.3.3
  51.  /usr/local/lib/gcc-lib/3300/2.3.3/cpp -lang-c++ -v -I. -I. -I../include -I./../include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dm68k -Dunix -DsysV68 -D__m68k__ -D__unix__ -D__sysV68__ -D__m68k -D__unix -D__sysV68 -D__OPTIMIZE__ -D__HAVE_68881__ -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork change_lf.cc /usr/tmp/cca20797.i
  52. GNU CPP version 2.3.3 (68k, SGS/AT&T sysV68 syntax)
  53.  /usr/local/lib/gcc-lib/3300/2.3.3/cc1plus /usr/tmp/cca20797.i -quiet -dumpbase change_lf.cc -O2 -version -o /usr/tmp/cca20797.s
  54. GNU C++ version 2.3.3 (68k, SGS/AT&T sysV68 syntax) compiled by GNU C version 2.3.3.
  55.  as -o change_lf.o /usr/tmp/cca20797.s
  56.         gcc -O2 -v -I. -I. -I../include -I./../include -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork   -c cmap.cc
  57. Reading specs from /usr/local/lib/gcc-lib/3300/2.3.3/specs
  58. gcc version 2.3.3
  59.  /usr/local/lib/gcc-lib/3300/2.3.3/cpp -lang-c++ -v -I. -I. -I../include -I./../include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dm68k -Dunix -DsysV68 -D__m68k__ -D__unix__ -D__sysV68__ -D__m68k -D__unix -D__sysV68 -D__OPTIMIZE__ -D__HAVE_68881__ -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork cmap.cc /usr/tmp/cca20802.i
  60. GNU CPP version 2.3.3 (68k, SGS/AT&T sysV68 syntax)
  61.  /usr/local/lib/gcc-lib/3300/2.3.3/cc1plus /usr/tmp/cca20802.i -quiet -dumpbase cmap.cc -O2 -version -o /usr/tmp/cca20802.s
  62. GNU C++ version 2.3.3 (68k, SGS/AT&T sysV68 syntax) compiled by GNU C version 2.3.3.
  63.  as -o cmap.o /usr/tmp/cca20802.s
  64.         gcc -O2 -v -I. -I. -I../include -I./../include -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork   -c cset.cc
  65. Reading specs from /usr/local/lib/gcc-lib/3300/2.3.3/specs
  66. gcc version 2.3.3
  67.  /usr/local/lib/gcc-lib/3300/2.3.3/cpp -lang-c++ -v -I. -I. -I../include -I./../include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dm68k -Dunix -DsysV68 -D__m68k__ -D__unix__ -D__sysV68__ -D__m68k -D__unix -D__sysV68 -D__OPTIMIZE__ -D__HAVE_68881__ -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork cset.cc /usr/tmp/cca20807.i
  68. GNU CPP version 2.3.3 (68k, SGS/AT&T sysV68 syntax)
  69.  /usr/local/lib/gcc-lib/3300/2.3.3/cc1plus /usr/tmp/cca20807.i -quiet -dumpbase cset.cc -O2 -version -o /usr/tmp/cca20807.s
  70. GNU C++ version 2.3.3 (68k, SGS/AT&T sysV68 syntax) compiled by GNU C version 2.3.3.
  71.  as -o cset.o /usr/tmp/cca20807.s
  72.         gcc -O2 -v -I. -I. -I../include -I./../include -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork   -c device.cc
  73. Reading specs from /usr/local/lib/gcc-lib/3300/2.3.3/specs
  74. gcc version 2.3.3
  75.  /usr/local/lib/gcc-lib/3300/2.3.3/cpp -lang-c++ -v -I. -I. -I../include -I./../include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dm68k -Dunix -DsysV68 -D__m68k__ -D__unix__ -D__sysV68__ -D__m68k -D__unix -D__sysV68 -D__OPTIMIZE__ -D__HAVE_68881__ -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork device.cc /usr/tmp/cca20812.i
  76. GNU CPP version 2.3.3 (68k, SGS/AT&T sysV68 syntax)
  77.  /usr/local/lib/gcc-lib/3300/2.3.3/cc1plus /usr/tmp/cca20812.i -quiet -dumpbase device.cc -O2 -version -o /usr/tmp/cca20812.s
  78. GNU C++ version 2.3.3 (68k, SGS/AT&T sysV68 syntax) compiled by GNU C version 2.3.3.
  79.  as -o device.o /usr/tmp/cca20812.s
  80.         gcc -O2 -v -I. -I. -I../include -I./../include -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork   -c errarg.cc
  81. Reading specs from /usr/local/lib/gcc-lib/3300/2.3.3/specs
  82. gcc version 2.3.3
  83.  /usr/local/lib/gcc-lib/3300/2.3.3/cpp -lang-c++ -v -I. -I. -I../include -I./../include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dm68k -Dunix -DsysV68 -D__m68k__ -D__unix__ -D__sysV68__ -D__m68k -D__unix -D__sysV68 -D__OPTIMIZE__ -D__HAVE_68881__ -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DLONG_FOR_TIME_T=1 -Dvfork=fork errarg.cc /usr/tmp/cca20817.i
  84. GNU CPP version 2.3.3 (68k, SGS/AT&T sysV68 syntax)
  85.  /usr/local/lib/gcc-lib/3300/2.3.3/cc1plus /usr/tmp/cca20817.i -quiet -dumpbase errarg.cc -O2 -version -o /usr/tmp/cca20817.s
  86. GNU C++ version 2.3.3 (68k, SGS/AT&T sysV68 syntax) compiled by GNU C version 2.3.3.
  87. errarg.cc: In method `errarg::errarg (const char *)':
  88. errarg.cc:25: class `errarg' does not have any field named `s'
  89. errarg.cc: In method `errarg::errarg (unsigned char)':
  90. errarg.cc:35: `c' undeclared (first use this function)
  91. errarg.cc:35: (Each undeclared identifier is reported only once
  92. errarg.cc:35: for each function it appears in.)
  93. errarg.cc: In method `errarg::errarg (int)':
  94. errarg.cc:38: class `errarg' does not have any field named `n'
  95. errarg.cc: In method `errarg::errarg (char)':
  96. errarg.cc:42: class `errarg' does not have any field named `c'
  97. errarg.cc: In method `errarg::errarg (double)':
  98. errarg.cc:46: class `errarg' does not have any field named `d'
  99. errarg.cc: In method `void  errarg::print ()const ':
  100. errarg.cc:63: `n' undeclared (first use this function)
  101. errarg.cc:56: too few arguments to function `const char * itoa (int)'
  102. errarg.cc:63: at this point in file
  103. errarg.cc:66: `c' undeclared (first use this function)
  104. errarg.cc:69: `s' undeclared (first use this function)
  105. errarg.cc:69: incompatible pointer types for argument 1 of `int  fputs (const char *, struct _%_0*)'
  106. /usr/local/lib/g++-include/stdio.h:120: too few arguments to function `int  fputs (const char *, struct _%_0*)'
  107. errarg.cc:69: at this point in file
  108. errarg.cc:72: `d' undeclared (first use this function)
  109. *** Error code 1
  110.  
  111. Stop.
  112. *** Error code 1
  113.  
  114. Stop.
  115. *** Error code 1
  116.  
  117. Stop.
  118. vki68 eks $ cat libgroff/errarg.cc
  119. // -*- C++ -*-
  120. /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
  121.      Written by James Clark (jjc@jclark.com)
  122.  
  123. This file is part of groff.
  124.  
  125. groff is free software; you can redistribute it and/or modify it under
  126. the terms of the GNU General Public License as published by the Free
  127. Software Foundation; either version 2, or (at your option) any later
  128. version.
  129.  
  130. groff is distributed in the hope that it will be useful, but WITHOUT ANY
  131. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  132. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  133. for more details.
  134.  
  135. You should have received a copy of the GNU General Public License along
  136. with groff; see the file COPYING.  If not, write to the Free Software
  137. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  138.  
  139. #include <stdio.h>
  140. #include "assert.h"
  141. #include "errarg.h"
  142.  
  143. errarg::errarg(const char *p) : s(p ? p : "(null)"), type(STRING)
  144. {
  145. }
  146.  
  147. errarg::errarg() : type(EMPTY)
  148. {
  149. }
  150.  
  151. errarg::errarg(unsigned char cc) : type(CHAR)
  152. {
  153.   c = cc;
  154. }
  155.  
  156. errarg::errarg(int nn) : type(INTEGER), n(nn)
  157. {
  158. }
  159.  
  160. errarg::errarg(char cc) : type(CHAR), c(cc)
  161. {
  162. }
  163.  
  164. errarg::errarg(double dd) : type(DOUBLE), d(dd)
  165. {
  166. }
  167.  
  168. int errarg::empty() const
  169. {
  170.   return type == EMPTY;
  171. }
  172.  
  173. extern "C" {
  174.   const char *itoa(int);
  175. }
  176.             
  177. void errarg::print() const
  178. {
  179.   switch (type) {
  180.   case INTEGER:
  181.     fputs(itoa(n), stderr);
  182.     break;
  183.   case CHAR:
  184.     putc(c, stderr);
  185.     break;
  186.   case STRING:
  187.     fputs(s, stderr);
  188.     break;
  189.   case DOUBLE:
  190.     fprintf(stderr, "%g", d);
  191.     break;
  192.   case EMPTY:
  193.     break;
  194.   }
  195. }
  196.  
  197. errarg empty_errarg;
  198.  
  199. void errprint(const char *format, 
  200.               const errarg &arg1,
  201.               const errarg &arg2,
  202.               const errarg &arg3)
  203. {
  204.   assert(format != 0);
  205.   char c;
  206.   while ((c = *format++) != '\0') {
  207.     if (c == '%') {
  208.       c = *format++;
  209.       switch(c) {
  210.       case '%':
  211.         fputc('%', stderr);
  212.         break;
  213.       case '1':
  214.         assert(!arg1.empty());
  215.         arg1.print();
  216.         break;
  217.       case '2':
  218.         assert(!arg2.empty());
  219.         arg2.print();
  220.         break;
  221.       case '3':
  222.         assert(!arg3.empty());
  223.         arg3.print();
  224.         break;
  225.       default:
  226.         assert(0);
  227.       }
  228.     }
  229.     else
  230.       putc(c, stderr);
  231.   }
  232. }
  233. vki68 eks $ cat include           cat include/errarg.h
  234. // -*- C++ -*-
  235. /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
  236.      Written by James Clark (jjc@jclark.com)
  237.  
  238. This file is part of groff.
  239.  
  240. groff is free software; you can redistribute it and/or modify it under
  241. the terms of the GNU General Public License as published by the Free
  242. Software Foundation; either version 2, or (at your option) any later
  243. version.
  244.  
  245. groff is distributed in the hope that it will be useful, but WITHOUT ANY
  246. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  247. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  248. for more details.
  249.  
  250. You should have received a copy of the GNU General Public License along
  251. with groff; see the file COPYING.  If not, write to the Free Software
  252. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  253.  
  254. class errarg {
  255.   enum { EMPTY, STRING, CHAR, INTEGER, DOUBLE } type;
  256.   union {
  257.     const char *s;
  258.     int n;
  259.     char c;
  260.     double d;
  261.   };
  262.  public:
  263.   errarg();
  264.   errarg(const char *);
  265.   errarg(char);
  266.   errarg(unsigned char);
  267.   errarg(int);
  268.   errarg(double);
  269.   int empty() const;
  270.   void print() const;
  271. };
  272.  
  273. extern errarg empty_errarg;
  274.  
  275. extern void errprint(const char *,
  276.                      const errarg &arg1 = empty_errarg,
  277.                      const errarg &arg2 = empty_errarg,
  278.                      const errarg &arg3 = empty_errarg);
  279.  
  280. vki68 eks $ cay   
  281. vki68 eks $ cat include/assert.h
  282. // -*- C++ -*-
  283. /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
  284.      Written by James Clark (jjc@jclark.com)
  285.  
  286. This file is part of groff.
  287.  
  288. groff is free software; you can redistribute it and/or modify it under
  289. the terms of the GNU General Public License as published by the Free
  290. Software Foundation; either version 2, or (at your option) any later
  291. version.
  292.  
  293. groff is distributed in the hope that it will be useful, but WITHOUT ANY
  294. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  295. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  296. for more details.
  297.  
  298. You should have received a copy of the GNU General Public License along
  299. with groff; see the file COPYING.  If not, write to the Free Software
  300. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  301.  
  302. #ifndef ASSERT_H
  303. #define ASSERT_H
  304. #ifdef __GNUG__
  305. volatile
  306. #endif
  307. void assertion_failed(int, const char *);
  308.  
  309. inline void do_assert(int expr, int line, const char *file)
  310. {
  311.   if (!expr)
  312.     assertion_failed(line, file);
  313. }
  314. #endif /* ASSERT_H */
  315.  
  316. #undef assert
  317.  
  318. #ifdef NDEBUG
  319. #define assert(ignore) /* as nothing */
  320. #else
  321. #define assert(expr) do_assert(expr, __LINE__, __FILE__)
  322. #endif
  323. vki68 eks $
  324.