AnsweredAssumed Answered

initialized and declared 'extern' [enabled by default]

Question asked by Rande Newberry on Mar 26, 2014
Latest reply on Mar 26, 2014 by pgo

We are using Coderwarior 10.5.

We are porting a Coldfire program to a K20 MK20DX128vlh5.

The GCC compiler complains of initialized and declared 'extern' [enabled by default] for all my external variables.

As an example

In the .h file I have

extern const char stCR[2];

 

In the .c file I have

extern const char stCRLF[]={"\r\n\0"};

 

This works fine for the Coldfire compiler but the GCC compiler gives a warning for every one of my variables declared as external.

 

What is the proper syntax to do the same thing in GCC?

Or can this warning be safely ignored?

 

Thanks

Outcomes