We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I builded a small project as follows:
============================= int a; int a; // Yes the same variable declared in the same way
main() { ...// anything } =============================
this project is successfully compiled. No warnings. Why ? What is really performed: 1. Only one variable. 2. Two variable occupying different memory but for further using only one is accessible.
How to check such a possible duplicate declaration in very large project with many files included if there is no warnings for this case?
(If Variable name is the same but declarations are different [int and char for an example] error occurs as expected)
This was tested on uVision 2.30 Keil C51 7.02