Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
c350f8c1
Commit
c350f8c1
authored
Aug 28, 2002
by
Nicola Pero
Committed by
Nicola Pero
Aug 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New objc.dg test for new -Wundeclared-selector ObjC option
From-SVN: r56616
parent
ece4ce85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/objc.dg/undeclared-selector.m
+48
-0
No files found.
gcc/testsuite/ChangeLog
View file @
c350f8c1
Tue Aug 27 22:23:22 2002 Nicola Pero <n.pero@mi.flashnet.it>
* objc.dg/undeclared-selector.m: New test.
2002-08-27 Nathan Sidwell <nathan@codesourcery.com>
2002-08-27 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/other/offsetof1.C: Avoid cast warning.
* g++.dg/other/offsetof1.C: Avoid cast warning.
...
...
gcc/testsuite/objc.dg/undeclared-selector.m
0 → 100644
View file @
c350f8c1
/* Test for -Wundeclared-selector. */
/* Author: Nicola Pero <nicola@brainstorm.co.uk>. */
/* { dg-do compile } */
/* { dg-options "-Wundeclared-selector" } */
#include <objc/objc.h>
@interface
MyClass
+
(
void
)
methodA
;
-
(
void
)
methodB
;
+
(
void
)
methodD
;
-
(
void
)
methodF
;
@end
@implementation
MyClass
+
(
void
)
methodA
{}
-
(
void
)
methodB
{}
+
(
void
)
methodD
{
SEL
d
=
@selector
(
methodD
);
/* Ok */
SEL
e
=
@selector
(
methodE
);
/* { dg-warning "undeclared selector" } */
}
-
(
void
)
methodE
{
SEL
e
=
@selector
(
methodE
);
/* Ok */
}
-
(
void
)
methodF
{
SEL
e
=
@selector
(
methodE
);
/* Ok */
}
@end
int
main
(
void
)
{
SEL
a
=
@selector
(
methodA
);
/* Ok */
SEL
b
=
@selector
(
methodB
);
/* Ok */
SEL
c
=
@selector
(
methodC
);
/* { dg-warning "undeclared selector" } */
SEL
d
=
@selector
(
methodD
);
/* Ok */
SEL
e
=
@selector
(
methodE
);
/* Ok */
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment