This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/79518] __builtin_assume_aligned should mark argument as aligned


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79518

--- Comment #2 from Evan Nemerson <evan@coeus-group.com> ---
(In reply to Andrew Pinski from comment #1)
> Why can't you use:
> #define     __assume_aligned(arg, align)  arg = __builtin_assume_aligned
> (arg, align)
> 
> ?

arg may be read-only.  void* const arg = ...; __assume_aligned(arg, 16)

arg is also evaluated twice, though I'm not sure how much of a problem that
would be in this situation, or how helpful __assume_aligned would be for other
compilers where it would matter…

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]