"Greg Lutz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've been watching the responses on this thread with some amazement,
> because so far, no one has noticed the essential problem:  it's a compiler
> bug all right, for not rejecting the code out of hand!
>
> It's the first statement in the function that's wrong.  Some choices for
> statements that would be *right* are:
>
>     static const char threeChars[] = "123";
>
>     static const char threeChars[] = {'1', '2', '3'};
>
>     static const char *threeChars[] = {"123"};

YOU ARE A SO CORRECT!!!!  Thank you so much!  How strange that the compiler
accepts this!  The reason I did it the way I did is that the code was
trimmed down from some other code which used a (proper) declaration like
this:

static const char *threeCharStrings[] = {"abc", "ABC", "123", NULL};

What a bonehead I am!!!  The strange thing is that *both* GCC *and*
CodeWarrior have NO PROBLEM with the definition/use (even with strict
options in effect).



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to