javier_ballesteros-rodriguez javier_ballesteros-rodriguez

Error in a conversion from 'const char *'  to 'char *'

Discussion created by javier_ballesteros-rodriguez javier_ballesteros-rodriguez on Apr 2, 2007
Latest reply on Apr 4, 2007 by javier_ballesteros-rodriguez javier_ballesteros-rodriguez

I am having a compilation problem with the command line tools of CodeWarrior for Coldfire.

The compiler version that I am using is the following.

CodeWarrior C/C++ for ColdFire.
Copyright (c) 2006, Freescale Semiconductor, Inc
All rights reserved.
Version 6.3 build 4
Runtime Built: Jul 12 2006 11:07:57

(With version 6.4 build 5 I also have the same issue).

The problem is that the compiler stops with a the following error "illegal implicit conversion from 'const char *' to 'char *'".

This conversion comes from an autogenerated code that I cannot control, so I need to add the right flag in CodeWarrior to avoid the error.

However, I have tried the following flags with no success:

- -nofail
- -w off
- -w noerror, noiserror
- -w nopedantic
- -pragma "no_conststringconv off"
- -ansi off
- -strict off

None of them works and I am stuck.

I send you a sample of the command used:

mwccmcf -c -strict off -nodefaults -msgstyle gcc -gccinc -ppopt line,full,space -g -model far -abi compact -proc MCF5282 TTest_aug.c -o TTest.o

And a sample of the output...

cwarrior_coldfire_t32_common\TTest_aug.c:2756: illegal implicit conversion from 'const char *' to
cwarrior_coldfire_t32_common\TTest_aug.c:2756: 'char *'
cwarrior_coldfire_t32_common\TTest.c:284: note: (corresponding #line reference)

Any ideas?

Thanks in advance,

Javier Ballesteros