On Fri, Jan 8, 2021 at 12:15 PM Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > > > On 1/8/21 12:55 PM, Qing Zhao via Gcc-patches wrote: > > Hi, > > > > Is there an utility routine in GCC to query the pointer width of the > > current target? Whether it’s 32bit pointer or 64 bit pointer for the target? > > > > Thanks a lot for the help. > You can look at the GET_MODE_SIZE (Pmode) or POINTER_SIZE. They can > differ in some circumstances. >
It is ptr_mode vs Pmode. ptr_mode is the software pointer mode. Pmode is the hardware pointer mode. They can be different. -- H.J.