https://bugs.llvm.org/show_bug.cgi?id=8718

Mark de Wever <ko...@xs4all.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ko...@xs4all.nl
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #4 from Mark de Wever <ko...@xs4all.nl> ---
I just tested with a recent master and the original test gives:
/tmp/int-ptr-cast-size-mismatch.c:23:10: warning: cast to 'void *' from smaller
integer type 'short' [-Wint-to-void-pointer-cast]
  return (void *)s;

Arnd's code gives
bug.cc:1275:12: error: cast from pointer to smaller type 'int' loses
information
          switch ((int)&a) {}
                  ^~~~~~~
bug.cc:1276:13: error: cast from pointer to smaller type 'int' loses
information
            return (int)&a;
                   ^~~~~~~

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to