diff options
Diffstat (limited to 'gdb/i386-darwin-tdep.c')
-rw-r--r-- | gdb/i386-darwin-tdep.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c index e0090ef..97fb387 100644 --- a/gdb/i386-darwin-tdep.c +++ b/gdb/i386-darwin-tdep.c @@ -36,6 +36,7 @@ #include "solib.h" #include "solib-darwin.h" #include "dwarf2-frame.h" +#include <algorithm> /* Offsets into the struct i386_thread_state where we'll find the saved regs. From <mach/i386/thread_status.h> and i386-tdep.h. */ @@ -137,8 +138,12 @@ i386_darwin_arg_type_alignment (struct type *type) int i; int res = 4; for (i = 0; i < TYPE_NFIELDS (type); i++) - res = max (res, - i386_darwin_arg_type_alignment (TYPE_FIELD_TYPE (type, i))); + { + int align + = i386_darwin_arg_type_alignment (TYPE_FIELD_TYPE (type, i)); + + res = std::max (res, align); + } return res; } /* 2. The caller aligns nonvector arguments to 4-byte boundaries. */ |