GCC16 or 17: when is the pointed type relevant for emitted assembler code?

Basile STARYNKEVITCH <[email protected]>
Newsgroups gmane.comp.gcc.devel
Message-ID <[email protected]>
Hello all,

Assume GCC16 (or future GCC17) targetting a common Von Neumann 64 bits
architecture (eg RISCV, AMD64, ARM-Aarch64, POWERPC-64).

Are there cases where the pointed type changes the generated code.

To be more concrete, I am thinking of generated C99 or C17 code (not
human written one).

If every generated pointer was void* and at every dereferencing
occurrence explicitly casted to the actual data pointer, does that make
any difference in generated assembler code?

In other words, is declaring only void* fields and local variables and
casting them on every dereferencing use makes a difference in generated
code.

My guess is no, but I could be wrong.

Thanks

-- 

Basile STARYNKEVITCH                           
<[email protected]>
8 rue de la Faïencerie                      
http://starynkevitch.net/Basile/  
92340 Bourg-la-Reine                        
https://github.com/bstarynk
France                               
https://github.com/RefPerSys/RefPerSys
                  https://orcid.org/0000-0003-0908-5250
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.