[llvm-bugs] [Bug 49349] New: [OpenCL] incorrect strict-prototypes warnings
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Feb 25 06:29:59 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49349
Bug ID: 49349
Summary: [OpenCL] incorrect strict-prototypes warnings
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: OpenCL
Assignee: unassignedclangbugs at nondot.org
Reporter: marco.antognini at arm.com
CC: anastasia.stulova at arm.com, llvm-bugs at lists.llvm.org
This code
void foo();
results in the following warning under -Wstrict-prototypes:
warning: this function declaration is not a prototype [-Wstrict-prototypes]
https://godbolt.org/z/zvfjGG
This is incorrect according to the OpenCL specification:
https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#restrictions
If a list of parameters in a function declaration is empty, the function takes
no arguments. This is due to the above restriction on variadic functions.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210225/b490c4bf/attachment.html>
More information about the llvm-bugs
mailing list