[cfe-commits] r44376 - in /cfe/trunk: AST/Expr.cpp include/clang/AST/Expr.h test/Sema/init.c
Nuno Lopes
nunoplopes at sapo.pt
Wed Nov 28 14:20:33 PST 2007
>>> =====================================================================
>>> --- cfe/trunk/AST/Expr.cpp (original)
>>> +++ cfe/trunk/AST/Expr.cpp Tue Nov 27 15:35:27 2007
>>> @@ -373,6 +380,8 @@
>>> case MemberExprClass:
>>> const MemberExpr *M = cast<MemberExpr>(this);
>>> return !M->isArrow() && M->getBase()->hasStaticStorage();
>>> + case ArraySubscriptExprClass:
>>> + return cast<ArraySubscriptExpr>(this)->getBase()->hasStaticStorage();
>>> }
>>> }
>>>
>>
>> this one breaks the build for me with gcc 4.1.2:
>> llvm[1]: Compiling Expr.cpp for Debug build
>> Expr.cpp: In member function 'bool clang::Expr::hasStaticStorage() const':
>> Expr.cpp:383: error: jump to case label
>> Expr.cpp:381: error: crosses initialization of 'const
>> clang::MemberExpr* M'
>>
>> I suggest moving the 'case ArraySubscriptExprClass' above the 'case
>> MemberExprClass'.
>
> Fixed, sorry.
Thank you!
Nuno
More information about the cfe-commits
mailing list