Description of problem: GCC 4.3 incorrectly warns about "static const" data that is declared inside an inline function. While warning about "static" data is correct, const isn't. Version-Release number of selected component (if applicable): Whatever is in: koji build --scratch dist-f9-gcc43 Steps to Reproduce: The code looks like: inline size_t ustr_xi__pow2(int use_big, unsigned char len) { static const unsigned char map_big_pow2[4] = {2, 4, 8, 16}; static const unsigned char map_pow2[4] = {0, 1, 2, 4}; if (use_big) return (map_big_pow2[len & 0x03]); return (map_pow2[len & 0x03]); } ...AIUI. this is the correct way to write the above function. Additional info: This is mainly being built to make sure Ustr doesn't break the C99 inline rules, which I think it doesn't due to the separate extern statement, however if it is that might be contributing to the problem. http://koji.fedoraproject.org/koji/getfile?taskID=327537&name=build.log
It's in debian too, mainly here so I can update them: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=450506
http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01432.html Will be fixed in gcc-4.3.0-0.7.