Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unsigned volatile long Vs volatile unsigned long

Tags:

c

gcc

I came across a code today where a particular hardware address was type casted to

unsigned volatile long * 

I know it can be volatile unsigned long or unsigned long volatile; is this another way of defining volatile or it is a bug in the code ?

I enabled warnings and surprised to see no warning. I was using GCC-4.7.0

like image 489
lxusr Avatar asked Jun 19 '26 18:06

lxusr


1 Answers

It's just another way, there's no semantic difference.

like image 118
unwind Avatar answered Jun 22 '26 08:06

unwind



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!