nickdesaulniers added inline comments.

================
Comment at: test/Sema/address_spaces.c:12
 {
-  _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}}
+  _AS2 *x;// expected-error {{use of undeclared identifier 'x'}}
   _AS1 float * _AS2 *B;
----------------
efriedma wrote:
> xbolva00 wrote:
> > nickdesaulniers wrote:
> > > efriedma wrote:
> > > > xbolva00 wrote:
> > > > > I think this is an acceptable change..
> > > > This is scary.  gcc and clang both parse `void f() { 
> > > > __attribute((aligned)) *x; }` etc. as a declaration; I don't think we 
> > > > want to change that, even if that usage is a bit dubious in modern C.  
> > > > And it's not clear to me if there are other implications here; does 
> > > > this affect the handling of statement/declaration ambiguity in C++?
> > > It's a pointer to implicit int.  Either way, I think the change and the 
> > > comments are polluting this code review, hence the suggestion to submit 
> > > as a separate individual patch.
> > But this patch causes changes in those files. So I dont know what to split 
> > here...
> This is caused by the change to lib/Parse/ParseStmt.cpp, right?  You should 
> be able to split that into a separate patch, even if there aren't any usable 
> statement attributes without the other parts of the patch.
Is it because the added call to `MaybeParseGNUAttributes()` in 
`lib/Parse/ParseStmt.cpp` can eventually produce this error? Your change as is 
seems to be breaking declarations of implicit integers.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63260/new/

https://reviews.llvm.org/D63260



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to