[Bug libstdc++/96083] New: Clang can't compile <ext/throw_allocator.h>: error: use of undeclared identifier '__builtin_sprintf'

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 6 16:43:37 GMT 2020


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

            Bug ID: 96083
           Summary: Clang can't compile <ext/throw_allocator.h>: error:
                    use of undeclared identifier '__builtin_sprintf'
           Product: gcc
           Version: 10.1.1
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

$ clang++   -include bits/extc++.h -x c++ - </dev/null
In file included from <built-in>:1:
In file included from
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/x86_64-redhat-linux/bits/extc++.h:69:
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/throw_allocator.h:316:7:
error: use of undeclared identifier '__builtin_sprintf'
      __builtin_sprintf(buf, "%lu", l);
      ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/throw_allocator.h:321:7:
error: use of undeclared identifier '__builtin_sprintf'
      __builtin_sprintf(buf, "%lu", l);
      ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/throw_allocator.h:325:7:
error: use of undeclared identifier '__builtin_sprintf'
      __builtin_sprintf(buf, "%p", ref.first);
      ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/throw_allocator.h:338:7:
error: use of undeclared identifier '__builtin_sprintf'
      __builtin_sprintf(buf, "%lu", l);
      ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/throw_allocator.h:342:7:
error: use of undeclared identifier '__builtin_sprintf'
      __builtin_sprintf(buf, "%p", ref.first);
      ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/throw_allocator.h:575:4:
error: use of undeclared identifier '__builtin_sprintf'
          __builtin_sprintf(buf, "%f", random);
          ^
6 errors generated.


More information about the Gcc-bugs mailing list