This is the mail archive of the
mailing list for the GCC project.
default function alignment
- From: Martin Sebor <msebor at gmail dot com>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 2 Aug 2017 11:30:24 -0600
- Subject: default function alignment
- Authentication-results: sourceware.org; auth=none
I'm writing a test to verify that multiple attribute aligned
specifiers on a function declaration are handled correctly
(bug 81566). In the test I need to know the default function
alignment for the target(*). I've the FUNCTION_BOUNDARY macro
used to set the default alignment for a function (IIUC). If
that is the right macro, or if there is a more appropriate
one, is there a way to get at its value in a unit test?
If there is no way, would enhancing target-supports.exp to
include a header that defines the macro? (I assume that would
be gcc/target.h for FUNCTION_BOUNDARY).
[*] I believe I need this to avoid test failures on targets
where the minimum function alignment is greater than 1 byte.
I might be able to use the largest known alignment (AFAICS,
that's 16 bytes on IA64 and the FR-V) as the minimum unless
there is also a target-specific maximum that I don't know
about. Is there? (And if so, what's the macro for it?)