Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 8.8
#1
1. extern int s=10;
2. static int s;
3.
4. void foo()
5. {
6. /* Do Something*/
7. }


Is line 1 non compliant for Rule 8.8 in the above example. I'm confused since line 1 gives a definition and not just declaration.
Here I'm not able to make out whether the var 's' have external or internal linkage.

My compiler binds 's' var with extern linkage if a definition is given with extern.(is value is also assigned like the above case).
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)