summaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-04 03:50:39 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-04 03:50:39 +0000
commit2fdec0270fde38e7e29a94911db5203972853d47 (patch)
treec18cd90272c7a2cb06261eb2a6d5a845ebb150f2 /gcc/c-family
parenta05c0499e041a44aa666813e767e4e04ef7ce2f5 (diff)
downloadgcc-2fdec0270fde38e7e29a94911db5203972853d47.tar.gz
gcc/:
* c-typeck.c (lookup_field): If -fplan9-extensions, permit referring to a field using a typedef name. (find_anonymous_field_with_type): New static function. (convert_to_anonymous_field): New static function. (convert_for_assignment): If -fplan9-extensions, permit converting pointer to struct to pointer to anonymous field. * c-decl.c (grokfield): If -fplan9-extensions, permit anonymous fields. (is_duplicate_field): New static function. (detect_field_duplicates_hash): If -fplan9-extensions, check for typedef names duplicating field names. (detect_field_duplicates): Likewise. * doc/invoke.texi (Option Summary): Mention -fplan9-extensions. (C Dialect Options): Document -fplan9-extensions. * doc/extend.texi (Unnamed Fields): Document -fplan9-extensions. gcc/c-family/: * c.opt (-fplan9-extensions): New option. gcc/testsuite/: * gcc.dg/anon-struct-11.c: New test. * gcc.dg/anon-struct-12.c: New test. * gcc.dg/anon-struct-13.c: New test. * gcc.dg/anon-struct-14.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164926 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/c.opt4
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index dc15f63914c..6f6aa908dee 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-03 Ian Lance Taylor <iant@google.com>
+
+ * c.opt (-fplan9-extensions): New option.
+
2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index a7ef3ea9956..cacf24907a9 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -893,6 +893,10 @@ fpermissive
C++ ObjC++
Downgrade conformance errors to warnings
+fplan9-extensions
+C ObjC Var(flag_plan9_extensions)
+Enable Plan 9 language extensions
+
fpreprocessed
C ObjC C++ ObjC++
Treat the input file as already preprocessed