================
@@ -4248,6 +4248,13 @@ void Parser::ParseDeclarationSpecifiers(
 
     // type-specifier
     case tok::kw_short:
+      if (!getLangOpts().NativeInt16Type) {
----------------
spall wrote:

int16_t and uint16_t are typedefs of short, and those typedefs were only 
generated if -enable-16bit-types was passed.  This should be the errors you are 
talking about.  The issue (which isn't clear from how the issue is written), is 
that users could still write their program using short 
```
export short allowed(short S) {return S+1;} // allowed because short is allowed
export uint16_t notAllowed(uint16_t U) {return U+ 1;} // not allowed because 
typedef of uint16_t  is missing
```
The point was to produce an error if a user used short when -enable-16bit-types 
is not passed. 

Half is still a valid type even if 16 bit types are not enabled. It is just a 
32 bit float instead of 16 bits.

https://github.com/llvm/llvm-project/pull/165584
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to