Article View: gnu.gcc.help
Article #54267non-ANSI stdlib.h?
From: Michael Dyck
Date: Fri, 04 Jan 1991 00:17
Date: Fri, 04 Jan 1991 00:17
21 lines
1416 bytes
1416 bytes
This is gcc-1.37, though I suspect it doesn't matter. If my C program has #include <stdlib.h>, then GNU cpp will look for it in $(libdir)/gcc-include, /usr/include, and /usr/local/include, in that order [according to cccp.c and Makefile]. $(libdir)/gcc-include has the following files: stddef.h stdarg.h assert.h va-*.h limits.h float.h varargs.h So cpp uses /usr/include/stdlib.h, which is system-supplied. The problem is that our system's /usr/include/stdlib.h is not ANSI- conformant (e.g., it doesn't have strtod or strtol). So compilation errors arise. In general, then, the question is: How is gcc supposed to be an ANSI C compiler if it depends on files that may not be ANSI-conformant (and perhaps might not even exist)? -Michael Dyck Centre for Systems Science, Simon Fraser University, Burnaby, BC, Canada dyck@cs.sfu.ca
Technical Details
Message-ID:
<1869@fornax.UUCP>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!fornax!dyckShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,951182e47a8e0fb9,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1991-01-04 03:09:29 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!fornax!dyck From: dyck@fornax.UUCP (Michael Dyck) Newsgroups: gnu.gcc.help Subject: non-ANSI stdlib.h? Message-ID: <1869@fornax.UUCP> Date: 4 Jan 91 00:17:04 GMT Reply-To: dyck@cs.sfu.ca Distribution: gnu Organization: School of Computing Science, SFU, Burnaby, B.C. Canada Lines: 21