home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.misc
- Path: sparky!uunet!convex!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!cv3.cv.nrao.edu!pmurphy
- From: pmurphy@nrao.edu (Pat Murphy)
- Subject: Weirdness with acc and stdio.h
- Message-ID: <PMURPHY.92Dec23110321@orangutan.cv.nrao.edu>
- Sender: news@nrao.edu
- Organization: National Radio Astronomy Observatory
- Distribution: comp
- Date: Wed, 23 Dec 1992 16:03:21 GMT
- Lines: 61
-
- We are attempting to convert from SunOS 4.1.2 to Solaris 2.x via the
- migration kit. In doing this, a bizarre aspect of using the "acc"
- "value-added" C compiler has manifested itself. Here is the test
- program:
-
- #include <stdio.h>
- main()
- {
- printf ("hello, world\n");
- }
-
- Then when the command:
-
- acc -c -I/usr/5include/ foo.c
-
- is given, the result is:
-
- "/usr/5include//stdio.h", line 12: warning: tokens ignored at end
- of directive line
-
- Furthermore, if the -Xc option is added for strict ANSI compliance,
- one also gets:
-
- "/usr/5include//stdio.h", line 12: warning: tokens ignored at end
- of directive line
- "/usr/5include//stdio.h", line 33: warning: tokens ignored at end
- of directive line
-
- Line 12 of the stdio.h file has no tokens at the end of the directive
- (33 does, it's an #endif and that is an ANSI violation). Before
- someone goes off the deep end saying I shouldn't be including this
- file and should be looking at /usr/lang/SC1.0/ansi_include instead,
- note the following comment at the beginning of the
- /usr/5include/stdio.h:
-
- #ifdef comment /* ======================================================= */
-
- "Standard" header file definition. See the C style paper for
- full explanations. Note that this reorganization has been
- forced upon us by ANSI C; please abide by it. This file, aside
- from this comment, is supposed to be a good example.
-
- But line 33 which closes another #ifdef says:
-
- #endif __[dir_]_filename_h
-
- which is NOT a good example.
-
- We are thoroughly confused. Should we NOT be specifying the
- /usr/5include area at all? This is on SunOS 4.1.2, acc version SC1.0
- (1Mar1991). Any (constructive) advice/comments welcomed.
-
- - Pat Murphy and Eric Greisen
- --
- ==========================================================================
- | Patrick P. Murphy, Ph.D. Scientific Programming Analyst |
- | National Radio Astronomy Observatory Net: pmurphy@nrao.edu |
- | 520 Edgemont Road Phone: (804) 296-0372 |
- | Charlottesville, VA 22903-2475 VoiceMail: (804) 980-5889 |
- | "I don't believe in the no-win scenario" --- James T. Kirk |
- ==========================================================================
-