public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Ming Cheng <Ming.Cheng@flextrade.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: GCC Decimal128 class
Date: Tue, 23 Jan 2024 14:18:05 +0000	[thread overview]
Message-ID: <CAH6eHdTrk54DaHJsTRj4-d+aFe_Hkep-AfjVkrNobUOzKyKTiw@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdTjWDFZv12aarLsGdMYoZEof3NFxN6=iDiLOh-zEE1guQ@mail.gmail.com>

On Tue, 23 Jan 2024 at 14:16, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> On Tue, 23 Jan 2024 at 02:01, Ming Cheng via Gcc <gcc@gcc.gnu.org> wrote:
> >
> > Hi GCC,
> >
> > Seems Janis is not at IBM. Wondering someone from GCC can help my question?
> >
> > Thanks
> > Ming.
> >
> > From: Ming Cheng
> > Sent: Monday, January 22, 2024 3:18 PM
> > To: janis187@us.ibm.com
> > Subject: GCC Decimal128 class
> >
> > Hi Janis Johnson,
> >
> > I want to test GCC Decimal128 class.
> >
> > This is my code:
> >
> > #include <stdio.h>
> > #include <cstdlib>
> > #include <vector>
> > #include <algorithm>
> > #include <ctime>
> > #include <random>
> > #include <string>
> > #include <fstream>
> > #include <fenv.h>
> > #include "decimal/decimal.h"
> >
> > int main (void)
> > {
> >     std::decimal::decimal128 d128{};
> >     return 0;
> > }
> >
> > When I compile by c++23 (/opt/rh/gcc-toolset-13/root/bin/g++ -rdynamic -std=c++23  -O2 ......)
> > I got this error:
> >
> > /opt/rh/gcc-toolset-13/root/usr/include/c++/13/decimal/decimal.h:46:10: error: 'decimal32' does not name a type
> >    46 |   inline decimal32::decimal32(decimal64 __r)    : __val(__r.__getval()) {}
> >
> > I checked /opt/rh/gcc-toolset-13/root/usr/include/c++/13/decimal/decimal.h and found this comments:
> >
> > /** @file decimal/decimal.h
> > *  This is an internal header file, included by other library headers.
> > *  Do not attempt to use it directly. @headername{decimal}
> > */
> >
> > Wondering whether you can give some advice?
>
>
> Like it says, you don't include <decimal/decimal.h>
>
> You want <decimal/decimal> instead. That works fine.

This is documented at:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_headers.html#table.decfp_headers

  reply	other threads:[~2024-01-23 14:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  5:34 RFC: Formalization of the Intel assembly syntax (PR53929) LIU Hao
2024-01-18  9:02 ` Fangrui Song
2024-01-18 12:54 ` Jan Beulich
2024-01-18 16:40   ` LIU Hao
2024-01-19  9:13     ` Jan Beulich
2024-01-20 12:40       ` LIU Hao
2024-01-22  8:39         ` Jan Beulich
2024-01-23  1:27           ` LIU Hao
2024-01-23  2:00             ` GCC Decimal128 class Ming Cheng
2024-01-23 14:16               ` Jonathan Wakely
2024-01-23 14:18                 ` Jonathan Wakely [this message]
     [not found]                   ` <MW3PR18MB3675DD35FF145008898711CF807B2@MW3PR18MB3675.namprd18.prod.outlook.com>
2024-01-24  6:22                     ` Ming Cheng
2024-01-23  8:38             ` RFC: Formalization of the Intel assembly syntax (PR53929) Jan Beulich
2024-01-23  9:00               ` LIU Hao
2024-01-23  9:03                 ` Jan Beulich
2024-01-23  9:21                   ` LIU Hao
2024-01-23  9:37                     ` Jan Beulich
2024-01-30  4:22     ` Hans-Peter Nilsson
2024-01-31 10:11       ` LIU Hao
     [not found] ` <DS7PR12MB5765DBF9500DE323DB4A8E29CB712@DS7PR12MB5765.namprd12.prod.outlook.com>
2024-01-19  1:42   ` LIU Hao
2024-01-19  7:41     ` Jan Beulich
2024-01-19  8:19     ` Fangrui Song
     [not found]     ` <DS7PR12MB5765654642BE3AD4C7F54E05CB702@DS7PR12MB5765.namprd12.prod.outlook.com>
2024-01-20 12:32       ` LIU Hao

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=CAH6eHdTrk54DaHJsTRj4-d+aFe_Hkep-AfjVkrNobUOzKyKTiw@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=Ming.Cheng@flextrade.com \
    --cc=gcc@gcc.gnu.org \
    /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).