diff mbox

[google/integration] Add placeholder flags for -Wthread-* (issue4001052)

Message ID 90e6ba6e86203ef164049b4d42c7@google.com
State New
Headers show

Commit Message

Diego Novillo Feb. 2, 2011, 2:13 p.m. UTC
Reviewers: gcc-patches_gcc.gnu.org, simonb_google.com,

Description:
Introduce placeholder flags for thread annotation support.  This is
being implemented in the thread-annotations branch, but Google code
expects these warnings to be supported by the compiler.

Tested on x86_64.  Committed on google/integration.


2011-02-01  Diego Novillo  <dnovillo@google.com>

	* common.opt (Wthread-safe, Wthread-unguarded-var,
	Wthread-unguarded-func, Wthread-mismatched-lock-order,
	Wthread-mismatched-lock-acq-rel, Wthread-reentrant-lock,
	Wthread-unsupported-lock-name): New placeholder warning flags.



Please review this at http://codereview.appspot.com/4001052/

Affected files:
   M gcc/common.opt


+
  Wtype-limits
  Common Var(warn_type_limits) Init(-1) Warning
  Warn if a comparison is always true or always false due to the limited  
range of the data type
diff mbox

Patch

Index: gcc/common.opt
diff --git a/gcc/common.opt b/gcc/common.opt
index  
12f41b13e88e9796e91d7006870d92b8d3e471f6..135822f3f5f01fcf3d7b2c3540b367d6bdaa5682  
100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -609,6 +609,38 @@  Wtrampolines
  Common Var(warn_trampolines) Warning
  Warn whenever a trampoline is generated

+; FIXME.  The following -Wthread-* flags are placeholders to prevent
+; confusing the compiler when applications are built with these flags.
+; Actual support for these flags is being implemented in the
+; thread-annotations branch.
+Wthread-safety
+Common Var(warn_thread_safety) Warning
+Warn about potential thread safety issues when the code is annotated with  
thread safety attributes
+
+Wthread-unguarded-var
+Common Var(warn_thread_unguarded_var) Init(1) Warning
+Warn about shared variables not properly protected by locks specified in  
the attributes
+
+Wthread-unguarded-func
+Common Var(warn_thread_unguarded_func) Init(1) Warning
+Warn about function calls not properly protected by locks specified in the  
attributes
+
+Wthread-mismatched-lock-order
+Common Var(warn_thread_mismatched_lock_order) Init(1) Warning
+Warn about lock acquisition order inconsistent with what specified in the  
attributes
+
+Wthread-mismatched-lock-acq-rel
+Common Var(warn_thread_mismatched_lock_acq_rel) Init(1) Warning
+Warn about mismatched lock acquisition and release
+
+Wthread-reentrant-lock
+Common Var(warn_thread_reentrant_lock) Init(1) Warning
+Warn about a lock being acquired recursively
+
+Wthread-unsupported-lock-name
+Common Var(warn_unsupported_lock_name) Init(0) Warning
+Warn about uses of unsupported lock names in attributes