Possible egcs-980115 bug handling pointer casts

John Wehle john@feith.com
Mon Jan 26 12:25:00 GMT 1998


I appreciate the information.  I don't mean to be thick, and I realize
this is getting off of the egcs-bugs topic, however a couple of last
questions:

  1) What are you quoting from?  I couldn't find the quote in the back
     of my ANSI C K&R, or in my copy of ANSI X3.159-1989.  Keep in mind
     that I talking C here, not C++.

  2) What is a "cv-qualified" version?

  3) The quote says that the behavior of accessing the stored value of an
     object through an lvalue of a char or unsigned char type is defined.
     More specifically does that mean:

       int a;
       ...
       *(char *)&a = ...

     is defined, even though

       int a;
       ...
       *(short *)&a = ...

     isn't?  I'll note that using *(char *)& in place of *(short *)& in
     the sample program still results in 32 bits being modified.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------




More information about the Gcc-bugs mailing list