[PATCH] D27123: Add AVR target and toolchain to Clang

Senthil Kumar Selvaraj via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 3 22:20:37 PST 2017


Dylan McKay writes:

> Did you get the BugZilla account sorted Senthil?

Nope, direct email also didn't help. Can you please file a bug with

Title:

UINT16_TYPE and INT16_TYPE are defined as short instead of int for AVR

Description:

   UINT16_TYPE and INT16_TYPE are implicitly defined by the preprocessor
   to the short type, rather than int. While shorts and ints are both
   16 bits wide on the avr, gcc picks ints to represent 16 bits wherever
   possible, and picking short can cause issues with C++ name mangling
   (see https://reviews.llvm.org/D27123#615854). Therefore, clang should
   define the two types to short.

   Clang's lib/Frontend/InitPreprocessor.cpp::DefineExactWidthIntType does not
   use TargetInfo::getIntTypeByWidth. Instead,
   InitializePredefinedMacros calls
   the function with the specific type (SignedShort/UnsignedShort), because
   getShortWidth() > getCharWidth(), but getIntWidth() ==
   getShortWidth().


What's necessary for sign-off? Should I ping the reviewer (Richard Smith) again?

Regards
Senthil


More information about the cfe-commits mailing list