Question:
What would be the return value for sizeof() in sharc and BF processor
Answer:
The values returned by sizeof() operator depends on whether -char-size-8 or -char-size-32 switch is being used with SHARC processors.
The sizeof() built-in function returns the size in units appropriate for its processors.
For Blackfin processors, units are in bytes.
For SHARC processors, units are in words.
For SHARC+ processors, units are in bytes when assembling with -char-size-8 switch and in words when assembling with -char-size-32 switch.
For more information please refer to the below help page.
CrossCore® Embedded Studio 2.x.x > SHARC® Development Tools Documentation > C/C++ Compiler Manual for SHARC® Processors > Compiler > Compiler Command-Line Interface > Data Type and Data Type Sizes