Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #155145

Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!!

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!!
Date 2020-09-18 23:42 -0700
Organization A noiseless patient Spider
Message-ID <868sd61d4x.fsf@linuxsc.com> (permalink)
References (6 earlier) <rk3dpq$85a$1@dont-email.me> <rk3kqj$puv$1@dont-email.me> <rk3qus$4fp$1@dont-email.me> <rk3rl4$8j6$1@dont-email.me> <87imcacvj6.fsf@nosuchdomain.example.com>

Show all headers | View raw


Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> James Kuyper <jameskuyper@alumni.caltech.edu> writes:
>
>> On 9/18/20 10:38 PM, BGB wrote:
>>
>>> On 9/18/2020 7:53 PM, James Kuyper wrote:
>>>
>>>> On 9/18/20 6:53 PM, BGB wrote:
>>>> ...
>>>>
>>>>> In my compiler, both _Complex and _Imaginary are handled essentially as
>>>>> 2-element vector types (which in turn allow cast-conversion with some
>>>>> other types).
>>>>
>>>> Why in the world are you handling _Imaginary as a "2-element vector
>>>> type"?  The whole point of, for example, double _Imaginary is that the
>>>> real part is guaranteed to be exactly 0.0, which allows it to store only
>>>> the imaginary part, the same way that plain double has an imaginary part
>>>> that is guaranteed to be exactly 0.0, which allows double to store only
>>>> the real part.
>>>> Situations where _Imaginary is useful are relatively rare, but it's also
>>>> optional.  I don't see the point in implementing it unless you implement
>>>> it so that sizeof(double _Imaginary) == sizeof(double).
>>>
>>> Implementing _Imaginary as a 2-element vector means that both it and
>>> _Complex can be treated as more-or-less equivalent as far as the backend
>>> is concerned (with the primary difference between them being that the
>>> real part of an _Imaginary always holds zero).
>>
>> Any application for which such an implementation would be acceptable
>> would have been written to use _Complex, not _Imaginary.  Properly
>> implemented _Imaginary is not only half as big as _Complex, but can also
>> substantially reduce the number of elementary floating point operations
>> that need to be performed.  Virtually by definition, any application that
>> bothers to use _Imaginary would be using it precisely because those
>> benefits are important to that application.
>
> And N1570 Annex G says:
>
>     Each imaginary type has the same representation and alignment
>     requirements as the corresponding real type.  The value of an object
>     of imaginary type is the value of the real representation times the
>     imaginary unit.
>
> Support for imaginary types is optional.
>
> I'm actually a bit unclear on the requirements for imaginary types
> (_Imaginary float, _Imaginary double, _Imaginary long double).  N1570
> Annex G, which is normative, says:
>
>     This annex supplements annex F to specify complex arithmetic for
>     compatibility with IEC 60559 real floating-point arithmetic.  An
>     implementation that defines __STDC_IEC_559_COMPLEX__ shall conform
>     to the specifications in this annex.
>
> Both gcc and clang define __STDC_IEC_559_COMPLEX__, but neither
> supports imaginary types.  And a footnote in 6.4.1 (Keywords)
> merely says that "One possible specification for imaginary types
> appears in annex G.", which seems oddly vague.  The latest C2X
> draft I have, N2479, doesn't make any relevant changes.  (In C99,
> Annex G was informative, and it said "should conform" rather than
> "shall conform".)

Annex G is obligatory (in C11) only if __STDC_IEC_559_COMPLEX__
is defined.  An implementation may support imaginary types
without defining __STDC_IEC_559_COMPLEX__, in which case those
types need not conform to Annex G.  Thus Annex G is one possible
specification for imaginary types, but not the only possible
specification for imaginary types.

> Are gcc and clang non-conforming, or am I missing something?

For C99, Annex G is merely advisory, so both gcc and clang are
conforming.

For C11, gcc is not conforming.

The situation with clang is different.  By itself clang does not
define __STDC_IEC_559_COMPLEX__.  This may be seen by running
clang on an input like

    typedef unsigned long UL;

with a command like 'clang -std=c11 -pedantic -E -dM', and noting
the absence of the ..._IEC_559_... macros.  The definitions for
these macros comes from <complex.h>.  We might say clang+glibc is
not conforming.  I prefer to think of it as glibc overstepping
its bounds.  Either way, clang together with those header files
is failing (under C11 rules) to meet some of the obligations
stated in Annex G.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Microsoft Will now support C11 and C17 standard!!!!!!!!!! Real Troll <real.troll@trolls.com> - 2020-09-16 04:55 -1000
  Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Jens Stuckelberger <Jens_Stuckelberger@nowhere.net> - 2020-09-16 15:23 +0000
  Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-16 17:49 +0200
    Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-16 12:53 -0700
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! scott@slp53.sl.home (Scott Lurndal) - 2020-09-16 19:58 +0000
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! doctor@doctor.nl2k.ab.ca (The Doctor) - 2020-09-16 22:31 +0000
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-16 21:10 -0700
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-17 12:28 +0200
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-17 17:00 -0700
    Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Anton Shepelev <anton.txt@gmail.com> - 2020-09-17 02:13 +0300
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-17 07:44 +0200
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Manfred <noname@add.invalid> - 2020-09-18 22:08 +0200
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-19 06:54 +0200
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! gazelle@shell.xmission.com (Kenny McCormack) - 2020-09-17 11:05 +0000
    Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Andrey Tarasevich <andreytarasevich@hotmail.com> - 2020-09-20 00:41 -0700
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-20 11:03 +0200
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Manfred <noname@add.invalid> - 2020-09-20 15:51 +0200
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-09-20 07:41 -0700
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! scott@slp53.sl.home (Scott Lurndal) - 2020-09-20 14:41 +0000
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! scott@slp53.sl.home (Scott Lurndal) - 2020-09-20 14:39 +0000
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-20 16:55 +0200
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! David Brown <david.brown@hesbynett.no> - 2020-09-20 17:10 +0200
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-20 18:14 +0200
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! already5chosen@yahoo.com - 2020-09-20 10:44 -0700
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! David Brown <david.brown@hesbynett.no> - 2020-09-20 21:14 +0200
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! already5chosen@yahoo.com - 2020-09-20 15:40 -0700
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! David Brown <david.brown@hesbynett.no> - 2020-09-21 08:34 +0200
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-20 12:55 -0500
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! David Brown <david.brown@hesbynett.no> - 2020-09-20 21:16 +0200
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-20 20:40 +0100
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-20 19:39 -0500
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! David Brown <david.brown@hesbynett.no> - 2020-09-21 09:20 +0200
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-21 11:25 +0100
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! David Brown <david.brown@hesbynett.no> - 2020-09-21 14:27 +0200
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-21 22:24 -0700
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-22 08:49 +0200
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Manfred <noname@add.invalid> - 2020-09-21 15:09 +0200
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Manfred <noname@add.invalid> - 2020-09-21 15:26 +0200
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-21 11:40 +0100
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! David Brown <david.brown@hesbynett.no> - 2020-09-21 14:48 +0200
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-09-21 06:03 -0700
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-21 16:44 +0100
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-21 12:06 -0500
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-21 20:03 +0100
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-21 18:33 -0500
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-21 11:09 -0500
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-09-20 16:13 +0000
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-09-20 09:53 -0700
  Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-16 12:51 -0700
    Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-09-16 21:00 +0100
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Thiago Adams <thiago.adams@gmail.com> - 2020-09-17 05:28 -0700
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-17 17:03 -0700
  Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Leo <usenet@gkbrk.com> - 2020-09-17 16:45 +0300
    Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-17 16:59 +0200
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! gazelle@shell.xmission.com (Kenny McCormack) - 2020-09-17 19:36 +0000
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-17 17:08 -0700
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-18 06:11 +0200
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-17 22:38 -0700
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! gazelle@shell.xmission.com (Kenny McCormack) - 2020-09-18 10:12 +0000
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-18 12:26 +0200
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-18 19:18 -0700
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-18 19:19 -0700
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-19 04:21 +0200
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-09-18 19:28 -0700
    Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-09-17 16:53 +0100
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! already5chosen@yahoo.com - 2020-09-17 16:28 -0700
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-09-18 00:46 +0100
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! already5chosen@yahoo.com - 2020-09-18 07:31 -0700
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-18 17:53 -0500
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-19 01:02 +0100
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-09-18 17:34 -0700
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-18 20:57 -0500
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-09-18 23:43 -0700
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-19 11:01 +0100
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-19 13:33 -0500
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-11-29 00:23 -0800
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-09-18 20:53 -0400
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-18 21:38 -0500
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-09-18 22:50 -0400
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-09-18 20:09 -0700
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! BGB <cr88192@gmail.com> - 2020-09-18 23:52 -0500
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-09-18 23:42 -0700
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bonita Montero <Bonita.Montero@gmail.com> - 2020-09-19 06:43 +0200
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Manfred <noname@add.invalid> - 2020-09-18 20:32 +0200
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-18 20:06 +0100
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Manfred <noname@add.invalid> - 2020-09-18 22:04 +0200
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-09-18 21:05 +0100
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-18 23:05 +0100
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-09-18 23:14 +0100
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-09-18 14:09 -0700
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-18 22:33 +0100
      Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-09-18 23:20 -0700
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-09-18 23:44 -0700
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-09-18 23:59 -0700
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-09-19 11:32 +0000
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-09-19 07:37 -0700
        Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-09-19 12:43 +0100
          Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-19 13:52 +0100
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-19 13:58 +0100
            Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-09-19 19:18 +0100
              Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Bart <bc@freeuk.com> - 2020-09-19 23:03 +0100
                Re: Microsoft Will now support C11 and C17 standard!!!!!!!!!! Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-09-19 23:54 +0100

csiph-web