All content and materials on this
site are provided "as is". TI and its respective suppliers and providers of content make no representations about
the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these
materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a
particular purpose, title and non-infringement of any third party intellectual property right. No license, either
express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a
license from a third party, or a license from TI.
Core issue 1601 states that the following code should call the overload of 'b' which takes a char argument, but the compiler chooses the int overload.
enum A : char { a };
int b(char) { return 1; }
int b(int) { return 999; }
int main()
{
printf("%d\n", b(a));
}
Core 1601: Overload resolution for enum with fixed type