Thread View: comp.sys.next.bugs
2 messages
2 total messages
Started by Dave Hess
Tue, 12 Jan 1993 00:20
gcc preprocessor and -traditional problem
Author: Dave Hess
Date: Tue, 12 Jan 1993 00:20
Date: Tue, 12 Jan 1993 00:20
19 lines
1154 bytes
1154 bytes
I was trying to put together a package (detex 2.4) that needed to be compiled with -traditional and gcc puked on some NeXT include files. gcc apparently won't interpret the funky macros that NeXT uses in some of their #include statements (for the architecture independent stuff) if the -traditional switch is on. This seems like a bug to me. Has anybody else hit this or have a workaround? Are there #pragmas that will do the same thing for me? The program dies when compiled with normal gcc. Thanks. Dave -- David K. Hess Graduate Assistant David-Hess@tamu.edu Supercomputer Center Texas A&M University
Re: gcc preprocessor and -traditional problem
Author: Dave Hess
Date: Tue, 12 Jan 1993 17:46
Date: Tue, 12 Jan 1993 17:46
58 lines
2548 bytes
2548 bytes
In article <1it2rtINNk7i@tamsun.tamu.edu> d1h1883@sc.tamu.edu (Dave Hess)
writes:
>
> I was trying to put together a package (detex 2.4) that needed to be
compiled
> with -traditional and gcc puked on some NeXT include files. gcc apparently
> won't interpret the funky macros that NeXT uses in some of their #include
> statements (for the architecture independent stuff) if the -traditional
> switch is on.
>
Apparently this is a bug and is known. I was forwarded the following.
> From: Kate Smith <Kate_Smith@NeXT.COM>
> Date: Wed, 30 Dec 92 14:43:55 -0800
> To: <serge@Princeton.EDU>
> Subject: [37670] @!compiler problems - something about the comments in
math.h
>
> Serge,
> We have a bug with our machine dependant include files when using the
-traditional flag. We have an include file that is used to build the name of
the machine dependant include file that really needs to be included. This
file uses an ansi directive that is invalid in traditional mode.
>
> So in order for you to get the math.h file included, you need to specify
the fullpath in your program, or modify math.h to include the proper file.
>
> So your program would look like this:
> #include </NextDeveloper/Headers/ansi/m68k/math.h>
>
> main()
> {
> double x;
> x=cos(1.2);
> printf("%f\n",x);
> }
>
> Or you could change math.h to include
/NextDeveloper/Headers/ansi/m68k/math.h instead of doing the machine
dependant stuff.
>
> Sorry for the inconvenience.
>
> Kate
It looks like the workaround is to fully qualify pathnames. The problem
is that this won't work on include files that include others. i.e.
<sys/param.h>. I would have to expand by hand all of macros. Ugh.
Thanks to Serge J. Goldstein for the info.
Dave
--
David K. Hess
Graduate Assistant David-Hess@tamu.edu
Supercomputer Center Texas A&M University
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads