This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Mon, Mar 17, 2003 at 05:59:25PM +0100, Falk Hueffner wrote:
> Robert Schiele <rschiele at uni-mannheim dot de> writes:
>
> > On Mon, Mar 17, 2003 at 04:24:34PM +0100, Falk Hueffner wrote:
> > > Robert Schiele <rschiele at uni-mannheim dot de> writes:
> > >
> > > > void a() {
> > > > double b;
> > > > int c[2];
> > > > *((int*)&b) && (c[1] = 0);
> > > > }
> > > >
> > > > Exactly same problem. And this time there is no pointer outside well
> > > > defined data area. You agree that this sample is legal code?
> > >
> > > No, you're violating the rule in 6.5.7 by accessing an object of type
> > > double with an lvalue of type int.
> >
> > 6.5.7? This one is about bitwise shift operators
>
> Sorry, I meant 6.5, paragraph 7.
Thanks again. Got it now. I am convinced that this is illegal code.
Robert
--
Robert Schiele Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker mailto:rschiele at uni-mannheim dot de
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |