Multi-character constant warnings

前端 未结 6 1509
别那么骄傲
别那么骄傲 2020-11-22 09:26

Why is this a warning? I think there are many cases when is more clear to use multi-char int constants instead of \"no meaning\" numbers or instead of defining const variabl

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 09:51

    If you're happy you know what you're doing and can accept the portability problems, on GCC for example you can disable the warning on the command line:

    -Wno-multichar
    

    I use this for my own apps to work with AVI and MP4 file headers for similar reasons to you.

提交回复
热议问题