473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to correctly read 6.2.5p26?

6.2.5p26:
"[...] All pointers to structure types shall have the same
representation and alignment requirements as each other. All pointers
to union types shall have the same representation and alignment
requirements as each other. Pointers to other types need not have the
same representation or alignment requirements."

Does the "each other" mean "each other of the same particular type" or
does it refer to all structure types in general? I was of the opinion
that different structure types do not bear the same alignment
requirements, but as non-native english reader I can't really identify
the subtle traces of definitve information in the standard sometimes.

Mark

Nov 14 '05 #1
1 968
Mark Piffer wrote:
6.2.5p26:
"[...] All pointers to structure types shall have the same
representation and alignment requirements as each other. All pointers
to union types shall have the same representation and alignment
requirements as each other. Pointers to other types need not have the
same representation or alignment requirements."

Does the "each other" mean "each other of the same particular type" or
does it refer to all structure types in general? I was of the opinion
that different structure types do not bear the same alignment
requirements, but as non-native english reader I can't really identify
the subtle traces of definitve information in the standard sometimes.


It means "all structure types." Different struct types
can have different alignment requirements, but pointers to
all those different struct types have the same alignment
requirement, the same size, and the same representation.

struct a { char c; };
struct b { long double ld[42]; }
/* `struct a' and `struct b' may have different
* alignment requirements.
*/

typedef struct a *pa;
typedef struct b *pb;
/* `pa' and `pb' -- perfectly good data types in
* their own right -- have the same alignment
* requirement.
*/

--
Eric Sosman
es*****@acm-dot-org.invalid
Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: keith edward | last post by:
Hello, I have a long web document... about 30 pages. It is currently in HTML (tables)... how do I format it so that is will print the pages correctly? Thanks, Keith
34
by: kroger | last post by:
Hi. I am at a loss to decipher why the javascript on my web page: http://www.psych.nmsu.edu/~jkroger/lab/index.html does not display the date correctly in Firefox. Instead of "2005" for the...
18
by: kenny | last post by:
I have a String outputhex which consists of unicodetext translated into hex. example: test = 7400650073007400 now i translate each two characters of the hexstring (outputhex) into byte and then...
5
by: Generic Usenet Account | last post by:
I have been to recreate a problem that I am having with strings with the trivial code snippet given below. In the trivial code example, I am reading five lines from a data file, each line having...
22
by: semedao | last post by:
Hi , I am using asyc sockets p2p connection between 2 clients. when I debug step by step the both sides , i'ts work ok. when I run it , in somepoint (same location in the code) when I want to...
8
by: Alec MacLean | last post by:
Hi, I'm using the DAAB Ent Lib (Jan 2006) for .NET 2.0, with VS 2005 Pro. My project is a Web app project (using the WAP add in). Background: I'm creating a survey system for our company, for...
1
by: Jsuboy23 | last post by:
Can anyone review my code and see if I am setting the private variables correctly in the following? I have a Shop class that has a function that calls for infomation to be read from an external...
1
by: blueday61 | last post by:
I am a website newbie, and built my site using a template and NVU. After I have it operational, I see that it doesn't display correctly in IE. My site is www.indianacemeteries.org . What do I need...
16
by: Summercool | last post by:
the sticky form is that if validation didn't pass, re-display the form with the value in the text input again (and for other input field as well...) no book I read did it correctly so far. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.