[Bug c++/68288] New: botched floating-point UDL
lucdanton at free dot fr
gcc-bugzilla@gcc.gnu.org
Wed Nov 11 08:43:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68288
Bug ID: 68288
Summary: botched floating-point UDL
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: lucdanton at free dot fr
Target Milestone: ---
I'm seeing this behaviour with GCC 6, GCC 5.2.0 and GCC 4.9.2.
$ g++-trunk --version
g++-trunk (GCC) 6.0.0 20151103 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cat main.cpp
long double operator""_a(long double) { return {}; }
long double operator""_e(long double) { return {}; }
int main()
{
// all fine
void(0e1_a+0);
void(0e1_e*0);
void(0e1_e +0);
// error: unable to find numeric literal operator 'operator""e+0'
void(0e1_e+0);
}
$ g++-trunk -std=c++11 main.cpp
main.cpp: In function 'int main()':
main.cpp:10:10: error: unable to find numeric literal operator 'operator""_e+0'
void(0e1_e+0);
^
main.cpp:10:10: note: use -std=gnu++11 or -fext-numeric-literals to enable more
built-in suffixes
More information about the Gcc-bugs
mailing list