home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / std / c / 3296 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  3.6 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!olivea!spool.mu.edu!umn.edu!csus.edu!netcom.com!rfg
  2. From: rfg@netcom.com (Ronald F. Guilmette)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Standard conformance and GCC 2.3.3
  5. Message-ID: <1992Dec30.203555.3615@netcom.com>
  6. Date: 30 Dec 92 20:35:55 GMT
  7. References: <1992Dec30.011211.11409@netcom.com> <C02I8I.58I@jrd.dec.com> <1992Dec30.173634.15487@crd.ge.com>
  8. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  9. Lines: 68
  10.  
  11. In article <1992Dec30.173634.15487@crd.ge.com> volpe@ausable.crd.ge.com writes:
  12. +In article <C02I8I.58I@jrd.dec.com>, diamond@jit533.jit.dec.com (Norman Diamond) writes:
  13. +|> In article <1992Dec30.011211.11409@netcom.com> rfg@netcom.com (Ronald F. Guilmette) writes:
  14. +|> >-----------------------------------------------------------------------------
  15. +|> >#7)  When compiling an empty source file while the -pedantic-errors option
  16. +|> >     is in effect, GCC will generate an error message for a line number which
  17. +|> >     does not actually exist in the source file.
  18. +|> 
  19. +|> I believe that diagnostics are allowed to contain spurious line numbers unless
  20. +
  21. +I believe the diagnostics are allowed to say anything they want...
  22.  
  23. Correct.  This is strictly a "quality of implementation" issue.
  24.  
  25. +|> >-----------------------------------------------------------------------------
  26. +|> >#9)  GCC fails to issue errors in cases where a static function is referenced
  27. +|> >     but never defined, even when the -pedantic-errors option is used.
  28. +|> >static void s (); int main () { s (); return 1; }
  29. +|> 
  30. +|> Again I see no violation of a constraint.  Furthermore, if you returned
  31. +
  32. +Me neither, but...
  33.  
  34. See ANSI section 3.7, constraints.
  35.  
  36. +|> >-----------------------------------------------------------------------------
  37. +|> >#20)  GCC incorrectly issues errors for the following standard-conformant
  38. +|> >      ANSI C code when the -pedantic-errors option is used.
  39. +|> >static enum E1 { red, green, blue};
  40. +|> >static struct S1 { int member; };
  41. +|> >static union U2 { int member; };
  42. +|> >void foobar () {
  43. +|> >    auto enum E2 { red, green, blue };
  44. +|> >    auto struct S2 { int member; };
  45. +|> >    auto union U2 { int member; };
  46. +|> >}
  47. +|> 
  48. +|> Spurious diagnostics are allowed, though now they return to the status of
  49. +|> unfriendly and misleading.  What happened when you tried executing it?
  50. +
  51. +These diagnostics are prefectly friendly and very helpful. Since the
  52. +declarations allocate no storage (there's no object being defined), a 
  53. +storage class specifier is useless and superfluous.
  54.  
  55. I disagree violently with the assertion that the issuance of errors for
  56. perfecly "standard conformant" code is "perfectly friendly and very helpful".
  57. Anyone who says such a thing obviously does not port code for a living!
  58.  
  59.  
  60. // Ron ("Loose Cannon") Guilmette    uucp: ...uunet!lupine!segfault!rfg
  61. //
  62. //      "On the one hand I knew that programs could have a compelling
  63. //       and deep logical beauty, on the other hand I was forced to
  64. //       admit that most programs are presented in a way fit for
  65. //       mechanical execution, but even if of any beauty at all,
  66. //       totally unfit for human appreciation."
  67. //                                              -- Edsger W. Dijkstra
  68.  
  69. -- 
  70.  
  71. // Ron ("Loose Cannon") Guilmette    uucp: ...uunet!lupine!segfault!rfg
  72. //
  73. //      "On the one hand I knew that programs could have a compelling
  74. //       and deep logical beauty, on the other hand I was forced to
  75. //       admit that most programs are presented in a way fit for
  76. //       mechanical execution, but even if of any beauty at all,
  77. //       totally unfit for human appreciation."
  78. //                                              -- Edsger W. Dijkstra
  79.