home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / amiga / programm / 15407 < prev    next >
Encoding:
Text File  |  1992-11-05  |  2.4 KB  |  52 lines

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!olivea!decwrl!concert!sas!mozart.unx.sas.com!walker
  2. From: walker@twix.unx.sas.com (Doug Walker)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: SAS/C 6.00 & ANSI & Strict and C='s includes
  5. Message-ID: <Bx8wxw.4Fs@unx.sas.com>
  6. Date: 5 Nov 92 13:46:43 GMT
  7. References: <1992Nov4.192404.1147@jupiter.sun.csd.unb.ca>
  8. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  9. Organization: SAS Institute Inc.
  10. Lines: 38
  11. Originator: walker@twix.unx.sas.com
  12. Nntp-Posting-Host: twix.unx.sas.com
  13.  
  14.  
  15. In article <1992Nov4.192404.1147@jupiter.sun.csd.unb.ca>, mctaylor@mta.ca writes:
  16. |> Why does my program get lots of warnings when I use ANSI and Strict for
  17. |> the messages, not from my program but from within the C= includes. The
  18. |> warning I am talking about is 149, something abouts structs. I would think
  19. |> that SAS would of picked this up. I am using the uncompressed headers.
  20. |> Not much else I can think that would effect it. So why does it do it?
  21. |>  
  22. |> ---------- Michael C. Taylor MCTAYLOR@mta.ca Student of Mount Allison U. ----
  23.  
  24. Read the description of the warning on page 244 of the User's Guide,
  25. Volume 1.  (You can also hit HELP while on one of these messages in
  26. SCMSG to get the online documentation for it.)
  27.  
  28. It is legal ANSI C to use structure tags in prototypes without 
  29. defining the tag, like this:
  30.  
  31.    void func(struct FOO *);  /* Struct FOO is never defined */
  32.  
  33. The STRICT option warns you when you do this because sometimes
  34. the ANSI scoping rules cause problems when you use such "incomplete"
  35. structure tags.  The Commodore headers don't automatically
  36. #include all the files they need to get rid of incomplete tags -
  37. which is probably a good thing, since you don't want to #include
  38. hundreds of include files just to get a few prototypes.  If you
  39. want to run with the STRICT option, you will have to either make
  40. sure that you explicitly #include the files that define the structures
  41. before #including the <proto/...> or <clib/...> file, or you 
  42. will have to suppress warning 149 with an IGNORE=149 option.
  43.  
  44. -- 
  45.   *****
  46. =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
  47.  *|. o.| ||                                          1200/2400/9600 Dual
  48.   | o  |//     For all you do, this bug's for you!
  49.   ====== 
  50. usenet: walker@unx.sas.com                            bix: djwalker 
  51. Any opinions expressed are mine, not those of SAS Institute, Inc.
  52.