craig.topper added a comment.

Fair point, what is the default signedness of char?

FWIW, all these  warn in gcc. So they seem to be just checking purely based on 
the int promotion without any concern for the original size?

  unsigned short foo(unsigned char a) {
    return a * a;
  }
  
  signed short bar(signed char a) {
    return a * a;
  }
  
  signed short foo(signed char a) {
    return a + a;
  }
  
  unsigned short foo(unsigned char a) {
    return a + a;
  }


Repository:
  rC Clang

https://reviews.llvm.org/D44559



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to