Print this page
Implement -fstrict-calling-conventions
Stock GCC is overly willing to violate the ABI when calling local functions,
such that it passes arguments in registers on i386.  This hampers debugging
with anything other than a fully-aware DWARF debugger, and is generally not
something we desire.
Implement a flag which disables this behaviour, enabled by default.  The flag is
global, though only effective on i386, to more easily allow its globalization
later which, given the odds, is likely to be necessary.

Split Close
Expand all
Collapse all
          --- old/gcc/common.opt
          +++ new/gcc/common.opt
↓ open down ↓ 1100 lines elided ↑ open up ↑
1101 1101  Does nothing.  Preserved for backward compatibility.
1102 1102  
1103 1103  ; Nonzero if we should do (language-dependent) alias analysis.
1104 1104  ; Typically, this analysis will assume that expressions of certain
1105 1105  ; types do not alias expressions of certain other types.  Only used
1106 1106  ; if alias analysis (in general) is enabled.
1107 1107  fstrict-aliasing
1108 1108  Common Report Var(flag_strict_aliasing) Optimization
1109 1109  Assume strict aliasing rules apply
1110 1110  
     1111 +fstrict-calling-conventions
     1112 +Common Report Var(flag_strict_calling_conventions) Init(1)
     1113 +Use strict ABI calling conventions even for static functions
     1114 +
1111 1115  fstrict-overflow
1112 1116  Common Report Var(flag_strict_overflow)
1113 1117  Treat signed overflow as undefined
1114 1118  
1115 1119  fsyntax-only
1116 1120  Common Report Var(flag_syntax_only)
1117 1121  Check for syntax errors, then stop
1118 1122  
1119 1123  ftest-coverage
1120 1124  Common Report Var(flag_test_coverage)
↓ open down ↓ 321 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX