[PATCH] Allow pointer decay and qual stripping for _Generic

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 11:23:26 PST 2015


The control expression for a _Generic selection expression should have
its type decayed and qualifiers stripped when determining which
selection it matches. e.g., the following should compile:

  _Generic("test", char *: 1);
  const int i = 12;
  _Generic(i, int: 1);

This patch fixes PR16340.

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generic.patch
Type: application/octet-stream
Size: 2879 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151104/11e17f51/attachment.obj>


More information about the cfe-commits mailing list