Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Explicit size of array in declaration with external linkage?
#1
Whenever you change the definition of an array, the corresponding declaration for external linkage may need to be adapted (different size of array). This is error-prone since the declaration usually is included in a file different from the file with the definition. As a consequence, the code becomes inconsistent and more difficult to understand.
Moreover, the size information in the declaration with external linkage is redundant. Compilers usually ignore it.
So what are the benefits of having rule 8.12 classified as a \"required\" rule?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)