[cfe-commits] r168895 - in /cfe/trunk: include/clang/Sema/Initialization.h lib/AST/ASTContext.cpp lib/CodeGen/CGCall.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp test/Sema/merge-decls.c

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jan 4 08:18:58 PST 2013


On 4 January 2013 05:34, Enea Zaffanella <zaffanella at cs.unipr.it> wrote:
> Hello Rafael.
...

> It seems to me that, this way, you are no longer unqualifying the parameter
> type. As a consequence, I now see the following:
>
> $ cat bug.c
> void foo1(void*);
> void foo2(void* const);
>
> void bar() {
>   foo1(0);
>   foo2(0);
> }
>
> In the call foo2(0), the null pointer implicit cast converts to a const
> qualified scalar rvalue, which should be forbidden; afaict, it should
> produce the very same cast as for the call foo1(0):

The attached patch should fix it.

> Enea.
>

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 1626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130104/2e6830d2/attachment.obj>


More information about the cfe-commits mailing list