home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / fortran / 4259 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.9 KB

  1. Xref: sparky comp.lang.fortran:4259 comp.sys.hp:12748
  2. Newsgroups: comp.lang.fortran,comp.sys.hp
  3. Path: sparky!uunet!utcsri!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!mroussel
  4. From: mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
  5. Subject: Weird HP compiler warning
  6. Message-ID: <1992Nov10.193635.2736@alchemy.chem.utoronto.ca>
  7. Sender: mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
  8. Organization: Department of Chemistry, University of Toronto
  9. Date: Tue, 10 Nov 1992 19:36:35 GMT
  10. Lines: 34
  11.  
  12.      I usually like my compilers to give me a lot of warnings, even when
  13. they are most likely useless.  In this case however, I have run across
  14. one warning whose meaning I cannot fathom.  Consider the following short
  15. program:
  16.  
  17.       double precision h,nexth,err,d2fex
  18.       h = 1.d0
  19.       err = 10.d0
  20.       d2fex = 123.d0
  21.           nexth = min(h,sqrt(12.d0*err/d2fex))
  22.       write(*,*)nexth
  23.       END
  24.  
  25. For this piece of code, the compiler produces the warning
  26.  
  27. Warning on line 5 of weird.f: Argument has same name as INTRINSIC function
  28.  
  29. Of course the argument has the same name as an intrinsic!  The argument
  30. IS an intrinsic!  Am I going to get this silly warning every time I put
  31. one intrinsic inside another?  My only comfort is that the program
  32. executes correctly despite a warning which, to me at least, seems to
  33. suggest that the compiler didn't get it.
  34.      If anyone on HP's compiler team is reading this, I would very much
  35. like to know what the rationale behind this strange warning is.  If
  36. anyone else can actually think of a reason why such a warning should be
  37. issued, I would very much like to hear it.
  38.      HP's compiler produces plenty of other warnings which no other sane
  39. compiler does, but at least I can see some sort of warped logic
  40. to most of the others I've seen so far.  (There's an EXTERNAL warning
  41. which annoys me, but I think I understand why it's issued.)  This one
  42. baffles me.
  43.  
  44.                 Marc R. Roussel
  45.                                 mroussel@alchemy.chem.utoronto.ca
  46.