From: Joey Ye <joey.ye.cc@gmail.com>
To: "Thomas Preud'homme" <thomas.preudhomme@arm.com>
Cc: Grissiom <chaos.proton@gmail.com>, Eric Blake <eblake@redhat.com>,
Joern Rennecke <joern.rennecke@embecosm.com>,
GCC <gcc@gcc.gnu.org>,
Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>,
avr-libc-dev@nongnu.org,
Andrew Burgess <andrew.burgess@embecosm.com>,
"newlib@sourceware.org" <newlib@sourceware.org>
Subject: Re: selective linking of floating point support for *printf / *scanf
Date: Tue, 02 Sep 2014 07:33:00 -0000 [thread overview]
Message-ID: <CAL0py26WdXN0N-jhejLAbEjZ-Q5xT6yunr1gnmcBhvpFPaVEfw@mail.gmail.com> (raw)
In-Reply-To: <000401cfc40a$a22255f0$e66701d0$@arm.com>
On Sat, Aug 30, 2014 at 12:26 PM, Thomas Preud'homme
<thomas.preudhomme@arm.com> wrote:
>> From: Grissiom [mailto:chaos.proton@gmail.com]
>> Sent: Friday, August 29, 2014 11:51 PM
>>
>> Yes, it does. The namespace reserved for the implementation is _[_A-Z].
> > The namespace _[a-z] is still available for the user. Which means the
>> user can declare their own _printf_float, and WE (as the implementation)
>> MUST NOT INTERFERE with it. Since WE are the implementation, we should
>> use the namespace reserved for us, namely __printf_float.
>
> Mmmh indeed. I checked C99 and section 7.1.3 paragraph 1 third clause states:
>
> "All identifiers that begin with an underscore and either an uppercase letter or
> another underscore are always reserved for any use."
>
> Next clause express how single underscore not followed by a capital letter is
> reserved:
>
> "All identifiers that begin with an underscore are always reserved for use as identifiers
> with file scope in both the ordinary and tag name spaces."
Apparently newlib is not following this specification very well, as
there are symbols like _abc_r defined every where in current newlib. I
am not implying the spec should not be followed, but is newlib
designed to have a loose spec for the single underscore?
- Joey
>
> Since here we are talking about linkage, _printf_float is not safe according to the
> standard.
>
> Sigh.
>
> Ok I need to think about it. Thank you all for pointing out the problem with the
> current scheme.
>
> Best regards,
>
> Thomas
>
>
next prev parent reply other threads:[~2014-09-02 7:33 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-14 8:52 RFD: " Joern Rennecke
2014-08-14 9:38 ` Thomas Preud'homme
2014-08-18 10:35 ` RFD: " Joey Ye
2014-10-07 7:33 ` Joern Rennecke
2014-08-26 6:48 ` Thomas Preud'homme
2014-08-26 10:43 ` Joern Rennecke
2014-08-27 7:02 ` Thomas Preud'homme
2014-08-27 10:13 ` Joern Rennecke
2014-08-27 10:41 ` Thomas Preud'homme
2014-08-27 11:54 ` Joern Rennecke
2014-08-28 5:30 ` Thomas Preud'homme
2014-08-28 13:47 ` Joern Rennecke
2014-08-29 6:04 ` Thomas Preud'homme
2014-08-29 13:20 ` Eric Blake
[not found] ` <CALC6sNDiJ+EOjTasMj2YCQmq10mVQrZKKsaUurhjQe=Zbn435g@mail.gmail.com>
2014-08-29 16:03 ` Eric Blake
2014-08-29 16:13 ` Eric Blake
2014-08-30 4:27 ` Thomas Preud'homme
2014-08-30 4:45 ` Thomas Preud'homme
2014-09-02 7:33 ` Joey Ye [this message]
2014-09-02 8:40 ` Andrew Haley
2014-09-02 15:28 ` Joseph S. Myers
2014-09-03 6:58 ` Thomas Preud'homme
2014-09-03 19:27 ` Joern Rennecke
2014-09-03 20:04 ` Joseph S. Myers
2014-10-23 8:49 ` Thomas Preud'homme
2014-10-23 15:21 ` Joseph S. Myers
2014-10-24 8:06 ` Thomas Preud'homme
2014-11-02 16:34 ` Joern Rennecke
2014-11-12 18:08 ` Thomas Preud'homme
2014-09-03 20:08 ` RFD: " Freddie Chopin
2014-09-03 20:19 ` Joel Sherrill
2014-09-03 20:29 ` Freddie Chopin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAL0py26WdXN0N-jhejLAbEjZ-Q5xT6yunr1gnmcBhvpFPaVEfw@mail.gmail.com \
--to=joey.ye.cc@gmail.com \
--cc=andrew.burgess@embecosm.com \
--cc=avr-libc-dev@nongnu.org \
--cc=chaos.proton@gmail.com \
--cc=eblake@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=joerg_wunsch@uriah.heep.sax.de \
--cc=joern.rennecke@embecosm.com \
--cc=newlib@sourceware.org \
--cc=thomas.preudhomme@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).