This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH], PowerPC long double transition patches, v2, Patch #3 (use correct way to get the IEEE 128-bit complex type)


On Sat, 23 Jun 2018, Segher Boessenkool wrote:

> On Thu, Jun 21, 2018 at 10:43:16PM +0000, Joseph Myers wrote:
> > On Thu, 21 Jun 2018, Segher Boessenkool wrote:
> > 
> > > The comment doesn't make much sense.  If long double is IBM, the long
> > > double complex mode is ICmode, not KCmode.  "To get the IEEE128 complex
> > > type", perhaps?  And can't you do _Complex __ieee128 or such?
> > 
> > You can do _Complex _Float128, in C only, not C++ (which doesn't have the 
> > _Float128 keyword).  _Complex can be used with keywords for type names, 
> > but not with a typedef name (built-in or otherwise, see discussion in bug 
> > 32187).
> 
> __ieee128 is a type, not a typedef:
> 
> lang_hooks.types.register_builtin_type (ieee128_float_type_node, "__ieee128");

A type registered with register_builtin_type is effectively a built-in 
typedef name and is handled in the front ends through the same code paths 
as typedef names (as opposed to types made up of type-specifier keywords, 
which are handled by custom logic in the front ends that maps multisets of 
such keywords to the corresponding types).

It would be possible, as discussed in bug 32187, to handle such types 
differently (so allowing _Complex together with __ieee128 while still not 
allowing it together with a user-defined typedef), but that's not the 
current situation.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]