On 05.01.16 11:32, Richard Earnshaw (lists) wrote:
On 23/12/15 19:28, Andreas Tobler wrote:

2015-12-23  Andreas Tobler  <andre...@gcc.gnu.org>

     * config/arm/freebsd.h: Rename SUBTARGET_OVERRIDE_OPTIONS to
     SUBTARGET_OVERRIDE_INTERNAL_OPTIONS. Adjust to check
     unaligned_access on the gcc_options set.
     * config/arm/arm.c (arm_option_override_internal): Use
     SUBTARGET_OVERRIDE_INTERNAL_OPTIONS.



This is OK.

One question, though, is whether you should explicitly override a user
request for unaligned accesses without at least warning that this is
being done.


Like this?

config/arm/freebsd.h:

#define SUBTARGET_OVERRIDE_INTERNAL_OPTIONS             \
do {                                                    \
    if (opts_set->x_unaligned_access == 1)           \
        warning (0, "target CPU does not support unaligned accesses");\
    if (opts->x_unaligned_access)                    \
        opts->x_unaligned_access = 0;

Thank you for the feedback.

Andreas 

Reply via email to