[Top][All Lists]

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

AW: [avr-gcc-list] Affecting variables

From: Stumpf Michael
Subject: AW: [avr-gcc-list] Affecting variables
Date: Tue, 8 May 2001 07:56:31 +0200

As long as no pointers are involved the order of type specifiers (char,int,..)
of type qualifiers (const,volatile) and storage class (extern,static,auto,..)
doesn't matter.

If pointers are involved things change a bit:
type specifieres and storage classes are only allowed on left side of *
(though the storage class refers to the pointer rather than to the pointee)
any type qualifier on left side of * refers to the object pointed to,
any type qualifier on right side of * refers to the pointer itself, so
teh two declaratons below are the same, but

volatile char * pbTest // pointer to a volatile char
char * volatile pbTest // volatile pointer to a char
extern const char * volatile pbTest // extern volatile pointer pointing to a const char


> Question: could someone illuminate the difference between:
> volatile char bTest;
> char volatile bTest;
> or are they the same?
> Cheers!
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list

reply via email to

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