Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #9537
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Ian Collins <ian-news@hotmail.com> |
| Newsgroups | comp.lang.c++ |
| Subject | Re: Is #pragma pack violates ODR for classes? |
| Date | Wed, 31 Aug 2011 16:58:23 +1200 |
| Lines | 14 |
| Message-ID | <9c5tbfF5dgU7@mid.individual.net> (permalink) |
| References | <307c82de-3f68-45dd-911a-f9b748a9d710@n12g2000yqh.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net U/AAKzTIHd7twj5FO2qH4wbVLa8d9Z3XaZsCLwDsXDIT9kseXI |
| Cancel-Lock | sha1:nVzApBOMh6Dm5EVumtoV+WPp26w= |
| User-Agent | Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4 |
| In-Reply-To | <307c82de-3f68-45dd-911a-f9b748a9d710@n12g2000yqh.googlegroups.com> |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.c++:9537 |
Show key headers only | View raw
On 08/31/11 04:41 PM, Fedor Rodikov wrote: > Hi Group! > > Recently I met a problem in a legacy C++ project. This project has > more than one translation unit which include header with class > template X. > This #include directive enclosed by #paragma pack in each cpp and the > value of this packing not the same. Does the X violate ODR or not? > Could a different packing in different translation units leads to UB? If the compiler takes any notice of the pragma, it certainly would. -- Ian Collins
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is #pragma pack violates ODR for classes? Fedor Rodikov <rodikov.fedor@gmail.com> - 2011-08-30 21:41 -0700
Re: Is #pragma pack violates ODR for classes? Ian Collins <ian-news@hotmail.com> - 2011-08-31 16:58 +1200
Re: Is #pragma pack violates ODR for classes? Fedor Rodikov <rodikov.fedor@gmail.com> - 2011-08-31 00:05 -0700
Re: Is #pragma pack violates ODR for classes? James Kanze <james.kanze@gmail.com> - 2011-09-01 16:00 -0700
Re: Is #pragma pack violates ODR for classes? Goran <goran.pusic@gmail.com> - 2011-08-31 00:23 -0700
Re: Is #pragma pack violates ODR for classes? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2011-08-31 09:33 -0700
Re: Is #pragma pack violates ODR for classes? Fedor Rodikov <rodikov.fedor@gmail.com> - 2011-09-01 02:52 -0700
csiph-web