home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / g / bug / 1863 < prev    next >
Encoding:
Text File  |  1992-11-24  |  3.4 KB  |  105 lines

  1. Newsgroups: gnu.g++.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.rice.edu!dougm
  3. From: dougm@cs.rice.edu (Doug Moore)
  4. Subject: (expr?f: g)(arg) bug
  5. Message-ID: <9211232230.AA27306@cs.rice.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Mon, 23 Nov 1992 22:30:37 GMT
  10. Approved: bug-g++@prep.ai.mit.edu
  11. Lines: 92
  12.  
  13. The program that follows successfully compiles and runs as expected
  14. under gcc 2.3.1 (patched).  Under g++ 2.3.1, however, it produces a
  15. compiler fault.  It is not clear whether the operation it attempts to
  16. perform is valid C++, or a documented extension in gcc, or an invalid
  17. operation that gcc accidentally accepts.  Anyway, any compiler fault
  18. is bad.
  19.  
  20. The compiler output:
  21. ===========================================================================
  22. cd /home/dougm/
  23. g++ -v -Wall bug.cc
  24. Reading specs from /blossom/lib/gcc-lib/sun4/2.3.1/specs
  25. gcc version 2.3.1
  26.  /blossom/lib/gcc-lib/sun4/2.3.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -Wall bug.cc /usr/tmp/cca27267.i
  27. GNU CPP version 2.3.1 (sparc)
  28.  /blossom/lib/gcc-lib/sun4/2.3.1/cc1plus /usr/tmp/cca27267.i -quiet -dumpbase bug.cc -Wall -version -o /usr/tmp/cca27267.s
  29. GNU C++ version 2.3.1 (sparc) compiled by GNU C version 2.3.1.
  30. bug.cc: In function `int  main (int, char **)':
  31. bug.cc:13: not enough type information
  32. /blossom/bin/sun4/gcc: Internal compiler error: program cc1plus got fatal signal 10
  33.  
  34. Compilation exited abnormally with code 1 at Mon Nov 23 16:28:56
  35. ===========================================================================
  36.  
  37. The program:
  38. ===========================================================================
  39. int foo(int x)
  40. {
  41.   return x;
  42. }
  43.  
  44. int baz(int x)
  45. {
  46.   return x+1;
  47. }
  48.  
  49. int main(int argc, char** argv)
  50. {
  51.   int x = ((argc-1)? foo: baz)(4);
  52.   return x;
  53. }
  54. ===========================================================================
  55.  
  56. The compilation is on a Sparc running SunOS 4.1.2.
  57.  
  58. The patches applied to the 2.3.1 source are from the net, and appeared
  59. with these headings:
  60.  
  61. From: eggert@twinsun.COM (Paul Eggert)
  62. Newsgroups: gnu.gcc.bug
  63. Subject: enquire 4.3 (GCC 2.3.1) generates some garbage bits in float.h
  64. Date: 2 Nov 92 22:08:31 GMT
  65.  
  66. From: eggert@twinsun.COM (Paul Eggert)
  67. Newsgroups: gnu.gcc.bug
  68. Subject: typo in fold-const.c prevents GCC 2.3.1 from catching some overflows
  69. Date: 2 Nov 92 23:54:39 GMT
  70.  
  71. From: eggert@twinsun.COM (Paul Eggert)
  72. Newsgroups: gnu.gcc.bug
  73. Subject: LDBL_MIN etc should be constant exprs (GCC 2.3.1, enquire 4.3, sparc)
  74. Date: 2 Nov 92 22:31:15 GMT
  75.  
  76. From: cliff@cs.cornell.edu (Cliff Krumvieda)
  77. Newsgroups: gnu.gcc.bug
  78. Subject: index, rindex, and gcc-2.3.1
  79. Date: 2 Nov 92 12:09:18 GMT
  80.  
  81. From: eggert@twinsun.COM (Paul Eggert)
  82. Newsgroups: gnu.gcc.bug
  83. Subject: GCC 2.3.1 overlooks int overflow in constant expressions
  84. Date: 3 Nov 92 01:33:26 GMT
  85.  
  86. From: cliff@cs.cornell.edu (Cliff Krumvieda)
  87. Newsgroups: gnu.gcc.bug
  88. Subject: more on index, rindex, and gcc-2.3.1
  89. Date: 2 Nov 92 16:43:13 GMT
  90.  
  91. From: gb@cs.purdue.edu (Gerald Baumgartner)
  92. Newsgroups: gnu.g++.bug
  93. Subject: GCC 2.3.1: incorrect error reporting in cp-decl.c, includes bug fix
  94. Date: 2 Nov 92 20:15:13 GMT
  95.  
  96. From: eric@pau.synnet.com (Eric Baur)
  97. Newsgroups: gnu.gcc.bug
  98. Subject: gcc-2.3.1 build problem under i386-mach
  99. Date: 3 Nov 92 19:01:53 GMT
  100.  
  101. If you have further questions, contact
  102. Doug Moore
  103. (dougm@cs.rice.edu)
  104.  
  105.