+2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR other/16615
+
+ * g++.dg/lto/odr-1_1.C: Update diagnostic message patterns to replace
+ "can not" with "cannot".
+ * gfortran.dg/common_15.f90: Likewise.
+ * gfortran.dg/derived_result_2.f90: Likewise.
+ * gfortran.dg/do_check_6.f90: Likewise.
+ * gfortran.dg/namelist_args.f90: Likewise.
+ * gfortran.dg/negative_unit_check.f90: Likewise.
+ * gfortran.dg/pure_formal_3.f90: Likewise.
+ * obj-c++.dg/attributes/method-attribute-2.mm: Likewise.
+ * obj-c++.dg/exceptions-3.mm: Likewise.
+ * obj-c++.dg/exceptions-4.mm: Likewise.
+ * obj-c++.dg/exceptions-5.mm: Likewise.
+ * obj-c++.dg/property/at-property-23.mm: Likewise.
+ * obj-c++.dg/property/dotsyntax-17.mm: Likewise.
+ * obj-c++.dg/property/property-neg-7.mm: Likewise.
+ * objc.dg/attributes/method-attribute-2.m: Likewise.
+ * objc.dg/exceptions-3.m: Likewise.
+ * objc.dg/exceptions-4.m: Likewise.
+ * objc.dg/exceptions-5.m: Likewise.
+ * objc.dg/param-1.m: Likewise.
+ * objc.dg/property/at-property-23.m: Likewise.
+ * objc.dg/property/dotsyntax-17.m: Likewise.
+ * objc.dg/property/property-neg-7.m: Likewise.
+
2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/68426
namespace {
- struct b; // { dg-lto-message "type 'struct b' defined in anonymous namespace can not match across the translation unit boundary" }
+ struct b; // { dg-lto-message "type 'struct b' defined in anonymous namespace cannot match across the translation unit boundary" }
}
enum vals {aa,bb,cc}; // { dg-lto-message "an enum with different value name is defined in another translation unit" }
struct a { // { dg-lto-message "a different type is defined in another translation unit" }
!
! Contributed by Vittorio Zecca <zeccav@gmail.com>
-common/sub/ a ! { dg-error "can not have the EXTERNAL attribute" }
+common/sub/ a ! { dg-error "cannot have the EXTERNAL attribute" }
external sub
end
subroutine test
integer :: i
type(grid) :: g
- g = new_field()%mesh ! { dg-error "can not be a function reference" }
+ g = new_field()%mesh ! { dg-error "cannot be a function reference" }
call new_field()%mesh%new_grid() ! { dg-error "Syntax error" }
- i = new_field() % mesh%new_int() ! { dg-error "can not be a function reference" }
+ i = new_field() % mesh%new_int() ! { dg-error "cannot be a function reference" }
end subroutine
end module
end do
! Invalid: io-implied-do
- print *, (i, i=1,5 ) ! { dg-error "PROTECTED and can not appear in a variable definition context .iterator variable." }
+ print *, (i, i=1,5 ) ! { dg-error "PROTECTED and cannot appear in a variable definition context .iterator variable." }
! Invalid: do-variable in a do-stmt
- do i = 1, 5 ! { dg-error "PROTECTED and can not appear in a variable definition context .iterator variable." }
+ do i = 1, 5 ! { dg-error "PROTECTED and cannot appear in a variable definition context .iterator variable." }
end do
end subroutine test1
end function
program pr50555
namelist /i/ j
- call g(k,l,i) ! { dg-error "can not be an argument" }
- f(k,l,i)=0 ! { dg-error "can not be an argument" }
- h = j(k,l,i) ! { dg-error "can not be an argument" }
+ call g(k,l,i) ! { dg-error "cannot be an argument" }
+ f(k,l,i)=0 ! { dg-error "cannot be an argument" }
+ h = j(k,l,i) ! { dg-error "cannot be an argument" }
end program
! Note: -std=gnu needed because line 15 function statement is obsolescent
! { dg-do compile }
! Test case from PR61933.
LOGICAL :: file_exists
- INQUIRE(UNIT=-1,EXIST=file_exists)! { dg-error "can not be -1" }
- INQUIRE(UNIT=-2,EXIST=file_exists)! { dg-error "can not be -2" }
+ INQUIRE(UNIT=-1,EXIST=file_exists)! { dg-error "cannot be -1" }
+ INQUIRE(UNIT=-2,EXIST=file_exists)! { dg-error "cannot be -2" }
END
pure subroutine foo()
use m
- call bar(x) ! { dg-error "can not appear in a variable definition context" }
+ call bar(x) ! { dg-error "cannot appear in a variable definition context" }
call bar2(x) ! { dg-error "is local to a PURE procedure and has the POINTER attribute" }
call bb(y) ! { dg-error "is local to a PURE procedure and has the POINTER attribute" }
contains
@end
@implementation obj
-- (int) depmth __attribute__((deprecated)) { return var; } /* { dg-warning "method attributes can not be specified in @implementation context" } */
+- (int) depmth __attribute__((deprecated)) { return var; } /* { dg-warning "method attributes cannot be specified in @implementation context" } */
- (int) depmtharg:(int) iarg { return var + iarg ; }
- (int) unusedarg:(int) __attribute__((unused)) uarg { return var; }
- (int) depunusedarg:(int) __attribute__((unused)) uarg { return var; }
}
@try { @throw object; }
- @catch (id <MyProtocol> x) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (id <MyProtocol> x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
}
@try { @throw object; }
- @catch (MyObject <MyProtocol> *x) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (MyObject <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
}
@try { @throw object; }
- @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
dummy++;
}
@catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */
- { /* { dg-error "@catch parameter can not be protocol-qualified" "" { target *-*-* } .-1 } */
+ { /* { dg-error "@catch parameter cannot be protocol-qualified" "" { target *-*-* } .-1 } */
dummy++;
}
@catch MyObject *x /* { dg-error "expected ... before .MyObject." } */
}
@try { @throw object; }
- @catch (id <MyProtocol>) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (id <MyProtocol>) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
}
@try { @throw object; }
- @catch (MyObject <MyProtocol> *) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (MyObject <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
}
@try { @throw object; }
- @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
{
Class isa;
}
-@property int a[8]; /* { dg-error "property can not be an array" } */
+@property int a[8]; /* { dg-error "property cannot be an array" } */
@property int b:8; /* { dg-error "expected" } */
-@property int c[]; /* { dg-error "property can not be an array" } */
+@property int c[]; /* { dg-error "property cannot be an array" } */
/* { dg-error "forbids flexible array member" "flexible array member" { target *-*-* } .-1 } */
@end
{
MyRootClass *object = [[MyRootClass alloc] init];
- object.count = 10; /* { dg-error "readonly property can not be set" } */
+ object.count = 10; /* { dg-error "readonly property cannot be set" } */
if (object.count != 10) /* Ok */
abort ();
/* Test errors when trying to change a readonly property using
pre/post increment/decrement operators. */
- object.count++; /* { dg-error "readonly property can not be set" } */
+ object.count++; /* { dg-error "readonly property cannot be set" } */
- ++object.count; /* { dg-error "readonly property can not be set" } */
+ ++object.count; /* { dg-error "readonly property cannot be set" } */
- object.count--; /* { dg-error "readonly property can not be set" } */
+ object.count--; /* { dg-error "readonly property cannot be set" } */
- --object.count; /* { dg-error "readonly property can not be set" } */
+ --object.count; /* { dg-error "readonly property cannot be set" } */
/* Test errors when trying to change something using Objective-C 2.0
dot-syntax but there is a setter but no getter. */
void foo (NSArray *ans[], id pid, id apid[], int i) {
NSArray *test;
- test.count = 1; /* { dg-error "readonly property can not be set" } */
- ((NSArray *)pid).count = 1; /* { dg-error "readonly property can not be set" } */
- ((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property can not be set" } */
- ans[i].count = 3; /* { dg-error "readonly property can not be set" } */
+ test.count = 1; /* { dg-error "readonly property cannot be set" } */
+ ((NSArray *)pid).count = 1; /* { dg-error "readonly property cannot be set" } */
+ ((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property cannot be set" } */
+ ans[i].count = 3; /* { dg-error "readonly property cannot be set" } */
}
@end
@implementation obj
-- (int) depmth __attribute__((deprecated)) { return var; } /* { dg-warning "method attributes can not be specified in @implementation context" } */
+- (int) depmth __attribute__((deprecated)) { return var; } /* { dg-warning "method attributes cannot be specified in @implementation context" } */
- (int) depmtharg:(int) iarg { return var + iarg ; }
- (int) unusedarg:(int) __attribute__((unused)) uarg { return var; }
- (int) depunusedarg:(int) __attribute__((unused)) uarg { return var; }
}
@try { @throw object; }
- @catch (id <MyProtocol> x) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (id <MyProtocol> x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
}
@try { @throw object; }
- @catch (MyObject <MyProtocol> *x) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (MyObject <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
}
@try { @throw object; }
- @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
dummy++;
}
@catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */
- { /* { dg-error "@catch parameter can not be protocol-qualified" "" { target *-*-* } .-1 } */
+ { /* { dg-error "@catch parameter cannot be protocol-qualified" "" { target *-*-* } .-1 } */
dummy++;
}
@catch MyObject *x /* { dg-error "expected ... before .MyObject." } */
}
@try { @throw object; }
- @catch (id <MyProtocol>) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (id <MyProtocol>) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
}
@try { @throw object; }
- @catch (MyObject <MyProtocol> *) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (MyObject <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
}
@try { @throw object; }
- @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter can not be protocol-qualified" } */
+ @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{
dummy++;
}
@end
@interface bar
--(void) my_method:(foo) my_param; /* { dg-error "can not use an object as parameter to a method" } */
+-(void) my_method:(foo) my_param; /* { dg-error "cannot use an object as parameter to a method" } */
@end
@implementation bar
--(void) my_method:(foo) my_param /* { dg-error "can not use an object as parameter to a method" } */
+-(void) my_method:(foo) my_param /* { dg-error "cannot use an object as parameter to a method" } */
{
}
@end
{
Class isa;
}
-@property int a[8]; /* { dg-error "property can not be an array" } */
-@property int b:8; /* { dg-error "property can not be a bit-field" } */
-@property int c[]; /* { dg-error "property can not be an array" } */
+@property int a[8]; /* { dg-error "property cannot be an array" } */
+@property int b:8; /* { dg-error "property cannot be a bit-field" } */
+@property int c[]; /* { dg-error "property cannot be an array" } */
@end
{
MyRootClass *object = [[MyRootClass alloc] init];
- object.count = 10; /* { dg-error "readonly property can not be set" } */
+ object.count = 10; /* { dg-error "readonly property cannot be set" } */
if (object.count != 10) /* Ok */
abort ();
/* Test errors when trying to change a readonly property using
pre/post increment/decrement operators. */
- object.count++; /* { dg-error "readonly property can not be set" } */
+ object.count++; /* { dg-error "readonly property cannot be set" } */
- ++object.count; /* { dg-error "readonly property can not be set" } */
+ ++object.count; /* { dg-error "readonly property cannot be set" } */
- object.count--; /* { dg-error "readonly property can not be set" } */
+ object.count--; /* { dg-error "readonly property cannot be set" } */
- --object.count; /* { dg-error "readonly property can not be set" } */
+ --object.count; /* { dg-error "readonly property cannot be set" } */
/* Test errors when trying to change something using Objective-C 2.0
dot-syntax but there is a setter but no getter. */
void foo (NSArray *ans[], id pid, id apid[], int i) {
NSArray *test;
- test.count = 1; /* { dg-error "readonly property can not be set" } */
- ((NSArray *)pid).count = 1; /* { dg-error "readonly property can not be set" } */
- ((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property can not be set" } */
- ans[i].count = 3; /* { dg-error "readonly property can not be set" } */
+ test.count = 1; /* { dg-error "readonly property cannot be set" } */
+ ((NSArray *)pid).count = 1; /* { dg-error "readonly property cannot be set" } */
+ ((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property cannot be set" } */
+ ans[i].count = 3; /* { dg-error "readonly property cannot be set" } */
}