Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 1.3 - Taking address of near auto variable
#4
That depends on the memory model of your platform.
Do you have a segmented memory model with near and far pointers where tSomefunt could lie in a different segment than tMyfunc/&MyUnSignVar?
That could be a potential problem, because the near pointer loses the segment information.
Hence it was flagged with Rule 1.3 by Gimpel (Rule 1.3 collects all undefined behavior for which no specific Rule exists).
Didn't you see the lint size options -spN (=size of near pointer) and -spF (=size of far pointer) i mentioned?
Are they set up correctly according to your platform/compiler, or not?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)