c42f / tinyformat

Minimal, type safe printf replacement library for C++
531 stars 75 forks source link

Different output for earlier compilers #82

Open maflcko opened 3 years ago

maflcko commented 3 years ago

The following code will print different output on different compilers:

enum Number : uint8_t {
        FOO = 111, 
};

int main(){
    std::cout << tinyformat::format("%s", Number::FOO) << std::endl;
}

gcc 9 (and earlier): 111 gcc 10 (and later): o clang 9 (and earlier): 111 gcc 10 (and later): o

maflcko commented 3 years ago

Probably a compiler bug, so feel free to close.