Topic: Make that VERY common! (was: A common scope snafu in many compilers(?))
Author: "Ronald F. Guilmette" <rfg@rahul.net>
Date: 1995/06/23 Raw View
In article <3s2obm$4r8@hustle.rahul.net>,
Ronald F. Guilmette <rfg@rahul.net> wrote:
>I have been led to believe that the following valid C code gets bogus
>errors when compiled (perhaps with strict ANSI options) with various
>C compilers from various big-name vendors.
>
>If you have a compiler that can't compile this, please let me know via reply
>E-mail. Thanks.
>
>-----------------------------------------------------------------------------
>void foobar ()
>{
> extern int thing;
>}
>
>typedef float thing;
>-----------------------------------------------------------------------------
Given all of the mail messages that I have received telling me about
C compilers which mishandle this code, I perhaps should have instead
asked for reports of compilers which handle this valid ISO C code
_correctly_.
Do any C++ compilers mishandle this? (I'm figuring that most C++ compilers
will do the Right Thing with this code, since C++ implementors are, in
general, forced to think a lot harder about scoping issues. Linkage issues
might still trip them up however.)
--
-- Ron Guilmette, Sunnyvale, CA ---------- RG Consulting -------------------
---- E-mail: rfg@segfault.us.com ----------- Purveyors of Compiler Test ----
---- finger: rfg@rahul.net ----------------- Suites and Bullet-Proof Shoes -