Path: utzoo!attcan!uunet!lll-winken!ames!killer!rpp386!jfh From: jfh@rpp386.Dallas.TX.US (John F. Haugh II) Newsgroups: comp.std.c Subject: Re: __STDC__ and non-conforming ANSI C compilers Message-ID: <11236@rpp386.Dallas.TX.US> Date: 18 Jan 89 05:16:05 GMT References: <358@masscomp.UUCP> <8742@megaron.arizona.edu> Reply-To: jfh@rpp386.Dallas.TX.US (John F. Haugh II) Organization: River Parishes Programming, Dallas TX Lines: 25 In article <8742@megaron.arizona.edu> mike@arizona.edu (Mike Coffin) writes: >From article <358@masscomp.UUCP>, by ftw@masscomp.UUCP (Farrell Woods): >> If I invoke a conforming compiler with "cc -DFOO", but my program >> has #ifdef __STDC__ in it, how does this break conformance? > >If "cc -DFOO" has the effect of providing of predefining FOO, then it >does not provide a conforming compilation environment: the program's >name space has been polluted. So I assume that __STDC__ will not be >defined in such cases. Do you think this should be an exception? If >so, do you have any other exceptions in mind? I really find this to be a highly bogus argument. There should be no difference between 'cc -DFOO ...' and adding a '#define FOO' at the very first line. Remember that it is the USER who polluted the namespace. Every variable or macro definition in a program is 'namespace pollution'. I would argue that the important difference is that the user selected the option to add the definition for FOO. Adding new reserved words, such as 'near' or 'far' or 'fortran' is different. Those aren't exceptions. -- John F. Haugh II +-Quote of the Week:------------------- VoiceNet: (214) 250-3311 Data: -6272 |"UNIX doesn't have bugs, InterNet: jfh@rpp386.Dallas.TX.US | UNIX is a bug." UucpNet : !killer!rpp386!jfh +--------------------------------------