codewarrior compiler issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

codewarrior compiler issue

Jump to solution
525 Views
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

Labels (1)
Tags (2)
1 Solution
425 Views
kef2
Senior Contributor IV

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.

View solution in original post

2 Replies
426 Views
kef2
Senior Contributor IV

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.

425 Views
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 Kudos