This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Adding __float128 (i.e TS 18661-3)
- From: Steven Munroe <munroesj at linux dot vnet dot ibm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Steve Munroe <sjmunroe at us dot ibm dot com>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Date: Wed, 08 Jun 2016 15:20:04 -0500
- Subject: Re: Adding __float128 (i.e TS 18661-3)
- Authentication-results: sourceware.org; auth=none
- References: <572BB6DF dot 7090709 at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 20 dot 1605052236310 dot 24016 at digraph dot polyomino dot org dot uk> <1465331531 dot 18737 dot 28 dot camel at oc7878010663> <alpine dot DEB dot 2 dot 20 dot 1606072103460 dot 9812 at digraph dot polyomino dot org dot uk> <1465336580 dot 18737 dot 42 dot camel at oc7878010663> <alpine dot DEB dot 2 dot 20 dot 1606072207170 dot 9812 at digraph dot polyomino dot org dot uk> <1465343325 dot 18737 dot 62 dot camel at oc7878010663> <alpine dot DEB dot 2 dot 20 dot 1606081224360 dot 12640 at digraph dot polyomino dot org dot uk>
- Reply-to: munroesj at linux dot vnet dot ibm dot com
On Wed, 2016-06-08 at 12:33 +0000, Joseph Myers wrote:
> On Tue, 7 Jun 2016, Steven Munroe wrote:
>
> > And we would like to avoid compile errors due to missing compiler
> > options and associated type randomization.
>
> Compile errors are fine - they make the problem obvious. What should be
> avoided is cases where code quietly gets built with the wrong type without
> producing errors, but does the wrong thing at runtime. (And there are a
> range of possible solutions to avoid that, including e.g. #error for the
> wrong long double format in a header used in the ldbl-128ibm code.)
>
There are cases were the compiler will silently convert types (at great
expense in performance) and not tell you anything.
The only way to find these is to look at the generated code. I found
several of these in my early prototypes for this work.
> > Separately we do use the printf plugin API to support _Decimal Float and
> > vector printf and provide these to Linux on Power customers. It is fair
> > to assume that we would provide a 'Q' format plugin for early adopters
> > of __float128.
>
> Sure, and if people want to use scanf like that I think it would be
> reasonable to add scanf hooks support similar to the printf hooks support.
>