This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
__builtin_dynamic_object_size
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 23 Jan 2019 10:40:43 +0000
- Subject: __builtin_dynamic_object_size
There's a patch to add __builtin_dynamic_object_size to clang:
https://reviews.llvm.org/D56760
It was suggested that this could be done via a new flag bit for
__builtin_object_size, but only if GCC would support that too
(otherwise it would be done as a separate builtin).
Is there any interest in adding that as an option to __builtin_object_size?
I know Jakub is concerned about arbitrarily complex expressions, when
__builtin_object_size is supposed to always be efficient and always
evaluate at compile time (which would imply the dynamic behaviour
should be a separate builtin, if it exists at all).