diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2010-10-18 18:06:03 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-10-18 18:06:03 +0000 |
commit | e426b47b65aca8b12aff9697e769c98c03af7691 (patch) | |
tree | a068d1420085148d89ec8d0b73da462d2b42d3fb /gcc/testsuite/objc.dg/try-catch-11.m | |
parent | 9887f1dcee5ba087d53ad187be5fb37e70a2e33e (diff) | |
download | gcc-e426b47b65aca8b12aff9697e769c98c03af7691.tar.gz |
In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
* c-parser.c (c_parser_typeof_specifier): Adapted to new parser
the following Objective-C change:
2005-10-07 Fariborz Jahanian <fjahanian@apple.com>
Radar 4204796
* c-parse.in (typespec_nonreserved_nonattr): Remove volatile from
'volatilized' type used in a typeof operator.
In gcc/c-family/:
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
Radar 4330422
* c-common.h (objc_non_volatilized_type): New declaration
* stub-objc.c (objc_non_volatilized_type): New stub.
In gcc/cp/:
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from apple/trunk branch on FSF servers.
2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
Radar 4451818
* call.c (standard_conversion, implicit_conversion): Ignore
'volatile' attribute of artificially volatized type in objc when
evaluating various conversion weights.
2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
Radar 4330422
* typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
artiificially 'volatized' type before doing pointer comparison.
In gcc/objc/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
Radar 4330422
* objc/objc-act.c (objc_non_volatilized_type): New
2005-10-07 Fariborz Jahanian <fjahanian@apple.com>
Radar 4204796
* objc-act.c (objc_build_volatilized_type): Build 'volatilzed'
types with proper attribute set and correctly.
(objc_volatilize_decl): Remove unneeded code.
(objc_type_quals_match): Use the new attribute to check on
'volatilzed' type.
(hash_init): removed unneeded code.
In gcc/testsuite/:
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
Radar 4451818
* obj-c++.dg/try-catch-16.mm: New.
* obj-c++.dg/try-catch-17.mm: New.
2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
Radar 4330422
* obj-c++.dg/try-catch-15.mm: New
2005-10-07 Fariborz Jahanian <fjahanian@apple.com>
Radar 4204796
* obj-c++.dg/try-catch-12.mm: New
* obj-c++.dg/try-catch-13.mm: New
* obj-c++.dg/try-catch-14.mm: New
* objc.dg/try-catch-11.m: New
* objc.dg/try-catch-12.m: New
* objc.dg/try-catch-13.m: New
From-SVN: r165654
Diffstat (limited to 'gcc/testsuite/objc.dg/try-catch-11.m')
-rw-r--r-- | gcc/testsuite/objc.dg/try-catch-11.m | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/try-catch-11.m b/gcc/testsuite/objc.dg/try-catch-11.m new file mode 100644 index 00000000000..e08f321e8c7 --- /dev/null +++ b/gcc/testsuite/objc.dg/try-catch-11.m @@ -0,0 +1,51 @@ +/* Ensure that typeof()-typed variables inside the @try { } block that + "inherit" their EH-volatileness from other variables in the stack frame + do not trigger "discards qualifiers from target pointer type" warnings. */ + +/* { dg-options "-fobjc-exceptions" } */ +/* { dg-do compile } */ + +typedef volatile int IOSharedLockData; + +@interface TestMyTests +- (void) testSpoon; +@end + +extern void some_func (int *); + +@implementation TestMyTests +- (void) testSpoon { + int i = 5; + + do { + @try { + typeof(i) j = 6; + some_func (&j); + } + @catch (id exc) { + @throw; + } + } while(0); + + do { + @try { + typeof(i) j = 7; + some_func (&j); + } + @catch (id exc) { + @throw; + } + } while(0); + + do { + @try { + typeof(i) j = 8; + some_func (&j); + } + @catch (id exc) { + @throw; + } + } while(0); + +} +@end |