linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Richard Moser <nigelenki@comcast.net>
To: Luciano Moreira - igLnx <lucianolnx@ig.com.br>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Variable Declaration Order
Date: Mon, 05 Jul 2004 11:27:05 -0400	[thread overview]
Message-ID: <40E97349.1080008@comcast.net> (raw)
In-Reply-To: <40E48EAA.4030106@ig.com.br>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

No, not at all.  I am asking about proper variable declaration order.
Try rereading the first message all the way through.

Luciano Moreira - igLnx wrote:
| What are you suggesting a use of pointers arrangement ?
|
| Are you thinking to use them to point to the next byte of the structure ?
| If yes, I suggest you to user "union", and to forget the ideia of
| attributes arragement, it could be dangerous and dependent of compilers
| options.
| I no, forget all I said.
|
| SAMPLE:
|
| struct incorrect {
|   char *p;
|   char buf[5];
| };
|
| struct correct {
|   union both {
|      char *p;
|      char buf[5];
|      // char *p; // could be here instead.
|   };
| };
|
| Luciano
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA6XNIhDd4aOud5P8RAoDUAJoCQgN8HQCFlNkWfikmq3rv4oZAggCfQt+L
SqnjXBeSADVxIbgPG/O28sM=
=V4u1
-----END PGP SIGNATURE-----

      reply	other threads:[~2004-07-05 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-01 17:54 Variable Declaration Order John Richard Moser
2004-07-01 22:22 ` Luciano Moreira - igLnx
2004-07-05 15:27   ` John Richard Moser [this message]

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=40E97349.1080008@comcast.net \
    --to=nigelenki@comcast.net \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=lucianolnx@ig.com.br \
    /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).