[Bug 1831385]

De34 1831385 at bugs.launchpad.net
Tue Apr 19 09:10:47 UTC 2022


(In reply to Jonathan Wakely from comment #13)
> It's not speculative. I am certain that ceilf was never once mentioned in a
> WG21 proposal (or minutes of WG21 meetings) until https://wg21.link/p0175
> proposed explicitly naming it in the C++ standard for consistency with the
> contents of <math.h> in C99.

Actually ceilf was explicitly mentioned in TR1
(https://wg21.link/n1836), although it was introduced as std::tr1::ceilf
then. I don't know why the -f/-l variants became implicit (or ignored)
when merging TR1 (except for math special functions) into the
standard...

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-8 in Ubuntu.
https://bugs.launchpad.net/bugs/1831385

Title:
  `std::cosf`, `std::sinf`, `std::sqrtf` are not declared in `<cmath>`

Status in gcc:
  Confirmed
Status in gcc-8 package in Ubuntu:
  New

Bug description:
  The following program fails to compile, even with `g++ --std=c++17
  test.cpp`.

  ```
  #include <cmath>
  #include <stdio.h>

  int main()
  {
  	printf("%f\n", std::cosf(0.0f));
  }
  ```

  `std::cosf` is required by the c++ standard. Draft N4659, page 1140.

  g++ version is 8.3.0-6ubuntu1

  ProblemType: Bug
  DistroRelease: Ubuntu 19.04
  Package: libstdc++-8-dev 8.3.0-6ubuntu1
  ProcVersionSignature: Ubuntu 5.0.0-15.16-generic 5.0.6
  Uname: Linux 5.0.0-15-generic x86_64
  ApportVersion: 2.20.10-0ubuntu27
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Sun Jun  2 15:05:25 2019
  InstallationDate: Installed on 2019-06-01 (0 days ago)
  InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: gcc-8
  UpgradeStatus: Upgraded to disco on 2019-06-01 (0 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1831385/+subscriptions




More information about the foundations-bugs mailing list