[cfe-dev] overloadable + C string literal looks like a bug, seeking confirmation
Jon Chesterfield via cfe-dev
cfe-dev at lists.llvm.org
Thu Apr 15 15:10:03 PDT 2021
Just opened https://bugs.llvm.org/show_bug.cgi?id=49978 with the default CC
as I'm not sure who does C front end stuff. Seeking confirmation that this
is considered a bug by other people.
__attribute__((overloadable) void func(char *);
__attribute__((overloadable) void func(const char *);
void call(void)
{
func("ambiguous");
}
I think "ambiguous" should decay to a char* and pick the char* overload.
Something of an edge case because "literals" have different types between C
and C++, and overloadable is an extension anyway.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210415/d51dfffc/attachment.html>
More information about the cfe-dev
mailing list