Loading...
 
Skip to main content

System Workbench for STM32


Pointer Artimetic Gets Compiler Warning

Copy to clipboard
ptestar = testar+1;

is not equivalent to

Copy to clipboard
ptestar = &testar+1;

The former is the same as

Copy to clipboard
ptestar = &testar[1];

This is not what I am seeking to do, which is to get a pointer to a location just beyond the bounds of the array to find the array size by the method I describe in this thread:
http://www.openstm32.org/tiki-view_forum_thread.php?forumId=7&comments_parentId=1612

I have given up on that method. I realize now there is no advantage to doing it that way over the use of the sizeof operator.