dimanche 25 juin 2023

Does clang add getters/setter methods in the generated bytecode for C?

I added new fields + get_*/set_* methods to my struct in the header file, but didn't (cause I forgot) add the simple implementation in the cc file.

I compiled my code with clang and it didn't show any errors. I immediately realized that I didn't add the implementation for the get_*/set_* methods and then wondered why the compiler didn't complain.

Is clang adding these get/set methods in the bytecode on its own?

Thanks!

Aucun commentaire:

Enregistrer un commentaire