codewarrior compiler issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

codewarrior compiler issue

ソリューションへジャンプ
1,276件の閲覧回数
vihaanred
Contributor III

Hi all,

 

i have found this strange problem with codewarrior compiler. My program is as follows

 

extern int i;

void test(int );

 

void main(void)

{

  test(i);

}

 

void test(int j)

{

  // do some logic

}

 

The program compiles without error. the program should have shown an error "i undefined". Can someone please explain me what is the solution for it?

 

Satya

ラベル(1)
タグ(2)
1 解決策
1,176件の閲覧回数
kef2
Senior Contributor V

You should mention what particular CW version you are talking about.

It is CW for S12(X), then you should see some  L1823 warnings, object created by default. To prevent this, you need to turn L1823 warning into error by adding  -WmsgSe1823 to the linker command line string setting.

元の投稿で解決策を見る

2 返答(返信)
1,177件の閲覧回数
kef2
Senior Contributor V

You should mention what particular CW version you are talking about.

It is CW for S12(X), then you should see some  L1823 warnings, object created by default. To prevent this, you need to turn L1823 warning into error by adding  -WmsgSe1823 to the linker command line string setting.

1,176件の閲覧回数
vihaanred
Contributor III

sorry for not being very clear about my question. But i think it should have been enabled by default because i thought it is a standard.

0 件の賞賛
返信