avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] long character constants like 'abcd'


From: Matthias Ringwald
Subject: [avr-gcc-list] long character constants like 'abcd'
Date: Tue, 21 Jan 2003 20:33:54 +0100

hi

I stumbled about a problem using avr-gcc (avr-gcc (GCC) 3.3 20020918 (experimental), here for atmega128)

I tried using 32 bit ids to address attribute/value pairs in the eeprom.
But I failed to do something like this in my app:

u32 myID = 'abcd';

Obviously, 4 characters make up a 32 bit number as it does on other platforms..

Here, I get a warning from the compiler saying e.g.

../share/sits-features.c:358:27: warning: character constant too long for its type

I'm wondering if this must be as I could easily write

u32 myID = 0x12345678;

without problems.

Or is there another way to specify such a value ?

(a << 24 | b << 16  .... etc fails also..)

Cheers,

 Matthias Ringwald

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]