GCC - shouldn't a warning be issued when assigning an int to a char?

前端 未结 6 2010
你的背包
你的背包 2020-12-19 05:47

I\'ve recently set up a MinGW + MSYS environment on my laptop to check how things are with Netbeans C/C++ support. Everything seems to work fine, however, during my testing

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-19 05:53

    I think it falls under the "Usual arithmetic conversions" (6.3.1.8) or "integer promotion rules" (5.1.2.3 (?)), but I can't find the specific text that says the behaviour you're seeing is expected.

提交回复
热议问题