This is the mail archive of the gcc-patches@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]

Re: [PATCH] PR c++/16307


On Sunday, 29. October 2006 02:40, Gabriel Dos Reis wrote:

> | +    return s [s ['\x80']];          // { dg-warning "array subscript" }
> Why double indexing?

It seems to be the easiest way to get a char subscript :) It is actually from 
the bugreport. But I don't mind, I've changed the testcase a little: 

+extern volatile char bla;
+
 char foo (const char *s)
 {
-    return s [s ['\x80']];          // { dg-warning "array subscript" }
+    return s [bla];          // { dg-warning "array subscript" }
 }


Dirk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]