|
Re: Eclipse C/C++ CDT (Pointer alignment for Typecasting) [message #1822192 is a reply to message #1822092] |
Sat, 29 February 2020 15:56 |
|
I am not an expert in C/C++ but will try to give an answer or at least a point for discussion.
Quote:I want the pointer to be attached to const NOT uint64_t
A pointer is a pointer to a variable, in this case a variable of type uint64_t. The compiler/linker will know where the variable is located and generate the physical address as value of the pointer.
When you define the variable as const then this is a special feature of this variable, and the compiler will generate an error (maybe a warning) if anywhere in the program the value of this variable shall be changed.
Anyway with or without const the pointer always will point to the adress of the variable. The pointer cannot point to the feature const.
Quote:... and also I donot want the spacing after const as shown above
For the compiler it is irrelevant if there is a spacing or not. With spacing is the common way to type.
Niko
Eclipse-CDT Version: 2019-12 (4.14.0), Win10 64bit
|
|
|
|
Powered by
FUDForum. Page generated in 0.20023 seconds