2

I noticed that if I declare a global variable multiple times the compiler does not even output a warning.

However if I declare a local variable in a function multiple times the gcc compiler outputs an error and does not compile the file.

What is the explanation for this behavior?

Ron
  • 14,674
  • 4
  • 34
  • 47
  • 3
    Next time after you've come up with the question title, before posting the question please take that title and paste it into Google Search, and open the first search result. If it answers your question, then please upvote the question and the best answers and move on. – Antti Haapala -- Слава Україні Oct 04 '17 at 10:47

0 Answers0