This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
For the sake of completeness, if you're wondering why gcc requires an integer type, please check the C standard:This is because your code finally ends up with this expression: (void*)ptr>> 4
and gcc doesn't allow the shift operation to be performed on pointer types. A possible solution to your problem could be the following code:
6.5.7 Bitwise shift operators [...]
Constraints Each of the operands shall have integer type.
Best regards, Andre-Marcel
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |