mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ryan Anderson <ryan@michonline.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: kernel-janitor-discuss@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Subject: [PATCH][SPARSE] Make all the anonymous structures truly anonymous
Date: Sat, 7 Jun 2003 20:43:35 -0400	[thread overview]
Message-ID: <20030608004335.GG20872@michonline.com> (raw)

This patch removes the type-names on the anonymous structures.  This
fixes compilation when using gcc-3.3 (Debian).  Credit for identifying
the fix goes to Arnaldo Carvalho de Melo <acme@conectiva.com.br>.

# This is a BitKeeper generated patch for the following project:
# Project Name: TSCT - The Silly C Tokenizer
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.354   -> 1.355  
#	             parse.h	1.35    -> 1.36   
#	            symbol.h	1.66    -> 1.67   
#	        expression.h	1.26    -> 1.27   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/07	ryan@mythryan2.(none)	1.355
# Fix anonymous structures to be truly anonymous. 
# (Fixes compile errors with gcc-3.2)
# --------------------------------------------
#
diff -Nru a/expression.h b/expression.h
--- a/expression.h	Sat Jun  7 16:43:52 2003
+++ b/expression.h	Sat Jun  7 16:43:52 2003
@@ -53,7 +53,7 @@
 		struct expression *unop;
 
 		// EXPR_SYMBOL
-		struct symbol_arg {
+		struct /* symbol_arg */ {
 			struct symbol *symbol;
 			struct ident *symbol_name;
 		};
@@ -62,35 +62,35 @@
 		struct statement *statement;
 
 		// EXPR_BINOP, EXPR_COMMA, EXPR_COMPARE, EXPR_LOGICAL and EXPR_ASSIGNMENT
-		struct binop_arg {
+		struct /* binop_arg */ {
 			struct expression *left, *right;
 		};
 		// EXPR_DEREF
-		struct deref_arg {
+		struct /* deref_arg */ {
 			struct expression *deref;
 			struct ident *member;
 		};
 		// EXPR_CAST and EXPR_SIZEOF
-		struct cast_arg {
+		struct /* cast_arg */ {
 			struct symbol *cast_type;
 			struct expression *cast_expression;
 		};
 		// EXPR_CONDITIONAL
-		struct conditional_expr {
+		struct /* conditional_expr */ {
 			struct expression *conditional, *cond_true, *cond_false;
 		};
 		// EXPR_CALL
-		struct call_expr {
+		struct /* call_expr */ {
 			struct expression *fn;
 			struct expression_list *args;
 		};
 		// EXPR_BITFIELD
-		struct bitfield_expr {
+		struct /* bitfield_expr */ {
 			unsigned char bitpos, nrbits;
 			struct expression *address;
 		};
 		// EXPR_LABEL
-		struct label_expr {
+		struct /* label_expr */ {
 			struct symbol *label_symbol;
 		};
 		// EXPR_INITIALIZER
@@ -98,11 +98,11 @@
 		// EXPR_IDENTIFIER
 		struct ident *expr_ident;
 		// EXPR_INDEX
-		struct index_expr {
+		struct /* index_expr */ {
 			unsigned int idx_from, idx_to;
 		};
 		// EXPR_POS
-		struct initpos_expr {
+		struct /* initpos_expr */ {
 			unsigned int init_offset;
 			struct symbol *init_sym;
 			struct expression *init_expr;
diff -Nru a/parse.h b/parse.h
--- a/parse.h	Sat Jun  7 16:43:52 2003
+++ b/parse.h	Sat Jun  7 16:43:52 2003
@@ -28,41 +28,41 @@
 	enum statement_type type;
 	struct position pos;
 	union {
-		struct label_arg {
+		struct /* label_arg */ {
 			struct symbol *label;
 			struct statement *label_statement;
 		};
 		struct expression *expression;
-		struct return_statement {
+		struct /* return_statement */ {
 			struct expression *ret_value;
 			struct symbol *ret_target;
 		};
-		struct if_statement {
+		struct /* if_statement */ {
 			struct expression *if_conditional;
 			struct statement *if_true;
 			struct statement *if_false;
 		};
-		struct compound_struct {
+		struct /* compound_struct */ {
 			struct symbol_list *syms;
 			struct statement_list *stmts;
 			struct symbol *ret;
 		};
-		struct labeled_struct {
+		struct /* labeled_struct */ {
 			struct symbol *label_identifier;
 			struct statement *label_statement;
 		};
-		struct case_struct {
+		struct /* case_struct */ {
 			struct expression *case_expression;
 			struct expression *case_to;
 			struct statement *case_statement;
 			struct symbol *case_label;
 		};
-		struct switch_struct {
+		struct /* switch_struct */ {
 			struct expression *switch_expression;
 			struct statement *switch_statement;
 			struct symbol *switch_break, *switch_case;
 		};
-		struct iterator_struct {
+		struct /* iterator_struct */ {
 			struct symbol *iterator_break;
 			struct symbol *iterator_continue;
 			struct symbol_list *iterator_syms;
@@ -74,7 +74,7 @@
 			struct statement  *iterator_post_statement;
 			struct expression *iterator_post_condition;
 		};
-		struct goto_struct {
+		struct /* goto_struct */ {
 			struct symbol *goto_label;
 			struct expression *goto_expression;
 		};
diff -Nru a/symbol.h b/symbol.h
--- a/symbol.h	Sat Jun  7 16:43:52 2003
+++ b/symbol.h	Sat Jun  7 16:43:52 2003
@@ -67,12 +67,12 @@
 	struct symbol	*same_symbol;
 	int (*evaluate)(struct expression *);
 
-	struct preprocessor_sym {
+	struct /* preprocessor_sym */ {
 		struct token *expansion;
 		struct token *arglist;
 	};
 	
-	struct ctype_sym {
+	struct /* ctype_sym */ {
 		unsigned long	offset;
 		unsigned int	bit_size;
 		unsigned int	bit_offset:8,

-- 

Ryan Anderson
  sometimes Pug Majere

             reply	other threads:[~2003-06-08  0:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-08  0:43 Ryan Anderson [this message]
2003-06-08  0:44 ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030608004335.GG20872@michonline.com \
    --to=ryan@michonline.com \
    --cc=acme@conectiva.com.br \
    --cc=kernel-janitor-discuss@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®