Quantcast
Viewing all articles
Browse latest Browse all 8

How to solve static declaration follows non-static declaration in GCC C code?

I'm trying to compile the same C file on two different machines with different versions of cc.

gcc version 3.2.3 says warning: 'foo' was declared implicitly 'extern' and later 'static'

gcc version 4.1.2 says error: static declaration of 'foo' follows non-static declaration

Both have the same CFLAGS. I'd like to make gcc 4.1.2 behave like gcc 3.2.3, that is, find an option that would turn this error into a mere warning.


Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>