https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89279

            Bug ID: 89279
           Summary: `floorf` not in `std` despite -std=c++11
           Product: gcc
           Version: 5.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: christ...@lipka-koeln.de
  Target Milestone: ---

Consider the following code snippet:

    #include <cmath>
    float foo(float x)
    {
        return std::floorf(x);
    }

Compiling with `g++ -std=c++11` causes a compiler error: `‘floorf’ is not a
member of ‘std’`.

According to the C++11 standard, `<cmath>` _must_ declare a `float
floorf(float)` in the `std` namespace and _may_ declare such a function in the
global namespace. However, `<cmath>` appears to only declares the global
function.

According to other reports, the problem is not limited to 5.4.0, but persists
to this day:

https://stackoverflow.com/questions/54623100/c-gcc-floorf-not-a-member-of-std?noredirect=1#comment96038966_54623100


(I'm not sure whether issues with the standard header files are to be
considered C++ or library issues; please re-assign if appropriate.)

Reply via email to