Warning: C12056

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,067件の閲覧回数
HarryHirn
Contributor I

Hi,

 

i get more than one time the compiler warning at function returns:

 

Warning: C12056: SP debug info incorrect because of optimization or inline assembler

 

Codewarrior 4.7 with compiler options -Cf -CPUHCS12 -Mb -TD4LD4LLD4

 

uc: 9S12DP512DGV

 

i got a really big structure with 100 elements (ram address 0x874 - 0xe51) and incresed the stack to 512 byte, which solved some ram messup :smileyhappy:

 

i think i saw the warnings the first time i included math.h but im not sure about that.

 

fact is that im not using any inline assembly where the warnings occour.

 

may the warning be risin by the math.h?

or the big size of my structure?

 

grtz

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,504件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

 

may the warning be risin by the math.h?

or the big size of my structure?

 


Including math.h itself does not cause it, also the size of structures does not matter.

 

I did explain the setup for this warning for example here:

 

 

https://community.freescale.com/message/66191#66191

 

The warning is more likely in huge functions and when some patterns are repeated multiple times. Using floating point increases the chances of this as even simple C statements can generate patterns big enough to optimize.

 

Also note that C12056 is not an error, "just" informs about one case of problematic debug information. Use -onf to switch the optimization of, but this will increase the code size (depending on the code possibly by quite a bit).

 

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,505件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

 

may the warning be risin by the math.h?

or the big size of my structure?

 


Including math.h itself does not cause it, also the size of structures does not matter.

 

I did explain the setup for this warning for example here:

 

 

https://community.freescale.com/message/66191#66191

 

The warning is more likely in huge functions and when some patterns are repeated multiple times. Using floating point increases the chances of this as even simple C statements can generate patterns big enough to optimize.

 

Also note that C12056 is not an error, "just" informs about one case of problematic debug information. Use -onf to switch the optimization of, but this will increase the code size (depending on the code possibly by quite a bit).

 

Daniel

0 件の賞賛
返信