linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yoann Padioleau <padator@wanadoo.fr>
To: linux-sparse@vger.kernel.org
Subject: label_statement ambiguity in parse.h
Date: Wed, 03 Dec 2008 22:29:06 -0600	[thread overview]
Message-ID: <87r64owokt.fsf@aryx.cs.uiuc.edu> (raw)



In parse.h 'struct statement' the same fieldname
"label_statement" is used multiple times. Is it intended ? 


struct statement {
	enum statement_type type;
	struct position pos;
	union {
		struct /* declaration */ {
			struct symbol_list *declaration;
		};
		struct /* label_arg */ {
			struct symbol *label;
==> HERE		struct statement *label_statement;
		};
                ...
		struct /* labeled_struct */ {
			struct symbol *label_identifier;
==> HERE		struct statement *label_statement;
		};




I guess from the gcc point of view it does not make a difference
as it will point to the same address because in both 
cases the items before have the same type and so size, but
if one day someone change one type, the user may have
some surprise ?


                 reply	other threads:[~2008-12-04  4:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87r64owokt.fsf@aryx.cs.uiuc.edu \
    --to=padator@wanadoo.fr \
    --cc=linux-sparse@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).