Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 328451 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-3 / +26 lines)
Line  Link Here
           Kevin F. Quinn  <kevquinn@gentoo.org>
           Kevin F. Quinn  <kevquinn@gentoo.org>
1
           * builtins.c (expand_builtin_init_trampoline): If
1
           * builtins.c (expand_builtin_init_trampoline): If
2
             -Wtrampolines make a warning.
2
             -Wtrampolines make a warning.
3
           * common.opt:  Add -Wtrampolines.
3
           * common.opt:  Add -Wtrampolines.
4
           * doc/invoke.texi:  Add -Wtrampolines.
4
           * doc/invoke.texi:  Add -Wtrampolines.
5
           #328451 set -Wtrampolines as default
5
           #328451 set -Wtrampolines as default
6
-- a/gcc/builtins.c
6
++ b/gcc/builtins.c
Lines 5155-5160 expand_builtin_init_trampoline (tree exp) Link Here
5155
  targetm.calls.trampoline_init (m_tramp, t_func, r_chain);
5155
  targetm.calls.trampoline_init (m_tramp, t_func, r_chain);
5156
5156
5157
  trampolines_created = 1;
5157
  trampolines_created = 1;
5158
5159
  warning_at (DECL_SOURCE_LOCATION (t_func), OPT_Wtrampolines,
5160
              "trampoline generated for nested function %qD", t_func);
5161
5158
  return const0_rtx;
5162
  return const0_rtx;
5159
}
5163
}
5160
5164
5161
-- a/gcc/common.opt
5165
++ b/gcc/common.opt
Lines 192-197 Wsystem-headers Link Here
192
Common Var(warn_system_headers) Warning
192
Common Var(warn_system_headers) Warning
193
Do not suppress warnings from system headers
193
Do not suppress warnings from system headers
194
194
195
Wtrampolines
196
Common Var(warn_trampolines) Init(1) Warning
197
Warn whenever a trampoline is generated
198
195
Wtype-limits
199
Wtype-limits
196
Common Var(warn_type_limits) Init(-1) Warning
200
Common Var(warn_type_limits) Init(-1) Warning
197
Warn if a comparison is always true or always false due to the limited range of the data type
201
Warn if a comparison is always true or always false due to the limited range of the data type
198
-- a/gcc/doc/invoke.texi
202
++ b/gcc/doc/invoke.texi
Lines 3611-3616 code. However, note that using @option{-Wall} in conjunction with this Link Here
3611
option will @emph{not} warn about unknown pragmas in system
3611
option will @emph{not} warn about unknown pragmas in system
3612
headers---for that, @option{-Wunknown-pragmas} must also be used.
3612
headers---for that, @option{-Wunknown-pragmas} must also be used.
3613
3613
3614
@item -Wtrampolines
3615
@opindex Wtrampolines
3616
@opindex Wno-trampolines
3617
 Warn about trampolines generated for pointers to nested functions.
3618
 
3619
 NOTE: In Gentoo, @option{-Wtrampolines} is set by default.
3620
 To disable, specify @option{-Wno-trampolines}
3621
3622
 A trampoline is a small piece of data or code that is created at run
3623
 time on the stack when the address of a nested function is taken, and
3624
 is used to call the nested function indirectly.  For some targets, it
3625
 is made up of data only and thus requires no special treatment.  But,
3626
 for most targets, it is made up of code and thus requires the stack
3627
 to be made executable in order for the program to work properly.
3628
3614
@item -Wfloat-equal
3629
@item -Wfloat-equal
3615
@opindex Wfloat-equal
3630
@opindex Wfloat-equal
3616
@opindex Wno-float-equal
3631
@opindex Wno-float-equal

Return to bug 328451