Omr: Missing include in omrformatconsts.h

Created on 29 Mar 2019  路  6Comments  路  Source: eclipse/omr

While trying to use the recently added OMR_PRId64 macro in the tril tests added in #3637, I noticed that my IDE was saying that the macro was expanding to lld on an x86-64 Linux, which is incorrect: on this system, int64_t is defined as long int not long long int, and so the correct format specifier is ld.

It seems that omrformatconsts.h checks for the presence of the PRId64 macro before using it (with the lld format specifier as a fallback if it doesn't), but does not include inttypes.h which is where that macro would be defined.

bug core

All 6 comments

FYI @rwy0717

Out of curiosity which IDE do you use?

@fjeremic Visual Studio Code. It takes some serious work to get the include paths set up right, but it seems to deal with extensible classes well enough to work with.

Thanks. I'm using Visual Studio proper myself, and yes IPATH's were tricky but it works. Hopefully IDE support improves once we've made the switch to CMake as some IDEs support CMake projects out of the box.

Fixed in #3709.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fjeremic picture fjeremic  路  3Comments

samolisov picture samolisov  路  5Comments

0dvictor picture 0dvictor  路  5Comments

Leonardo2718 picture Leonardo2718  路  6Comments

0xdaryl picture 0xdaryl  路  3Comments