------- Comment #2 from pinskia at gcc dot gnu dot org  2009-01-02 20:06 -------
Here is a testcase which ICEs with both the C and C++ front-end and is not
rejected by either of them:
struct A
{
  const char* p;
};

void foo()
{
  __builtin_offsetof(struct A, p[1]);
}
--- CUT ---
This is invalid code as p[1] is not a member of struct A, only p is a member.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|ice-on-valid-code           |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-02 20:06:49
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38699

Reply via email to