Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Compiler/TMS320F28379D: Why are declared strings linked to .const, but unsigned char Array[] are not?

$
0
0

Part Number:TMS320F28379D

Tool/software: TI C/C++ Compiler

Hi,

I am experiencing this behavior...

//This global declaration is linked to .econst

static unsigned char * Array = "string\0";

//This global declaration is linked to .ebss

static unsigned char Array[7] = {'s', 't', 'r', 'i', 'n', 'g','\0' };

I would expect both of these to be linked to .ebss. Why is the first considered a constant without the "const" keyword? Is this standard?

Regards,

sal


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>