@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2021 Jonathan Schleifer + * Copyright (c) 2008-2022 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -15,21 +15,30 @@ #include "config.h" #import "TestsAppDelegate.h" -static OFString *module = @"Runtime (ARC)"; +static OFString *const module = @"Runtime (ARC)"; @interface RuntimeARCTest: OFObject @end @implementation RuntimeARCTest - (instancetype)init { self = [super init]; +#ifdef OF_WINDOWS + /* + * Clang has a bug on Windows where it creates an invalid call into + * objc_retainAutoreleasedReturnValue(). Work around it by not using an + * autoreleased exception. + */ + @throw [[OFException alloc] init]; +#else @throw [OFException exception]; +#endif return self; } @end