Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: How does gcc (any compiler) actually convert a function call, say atoi(), into assembly/machine code? Date: Tue, 03 Jan 2017 09:01:56 -0800 Organization: None to speak of Lines: 24 Message-ID: References: <06544819-1f87-4e1c-94ca-918f049d1d42@googlegroups.com> <5bf5dcb7-ef8c-4d6b-aa1b-11f0522651b7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="f1ffbb62f7d4ea154aec5923c7307730"; logging-data="19964"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189PHFsE/A5nUEVshYtaUg+" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:WCg5sW6BXNKEYFA/SMkWdDntDoA= sha1:r2pS1/oS6Ponv5BQUpOhkPVYUcs= Xref: csiph.com comp.lang.c:101014 supercat@casperkitty.com writes: [...] > I think there are one or two places where Posix contradicts the C Standard > (e.g. by having standard headers define macros or identifiers that don't > start with an underscore and aren't listed by the Standard), [...] No, the authors of the POSIX standard actually thought of that. For POSIX functions and other identifiers declared in C standard headers such as , you have to define a macro like _POSIX_SOURCE before including the header to make the identifier visible. A compiler can define such a macro implicitly in a non-conforming mode. (IMHO it would have been better for all POSIX-specific identifiers to be declared only in POSIX-specific headers, but the authors of POSIX, like the authors of the C standard, had to deal with existing practice.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"