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
4ddf4d7b
Commit
4ddf4d7b
authored
Apr 08, 2000
by
Kaveh R. Ghazi
Committed by
Kaveh Ghazi
Apr 08, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/compare2.c: New test.
From-SVN: r33016
parent
65232ce9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
+62
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/compare2.c
+58
-0
No files found.
gcc/testsuite/ChangeLog
View file @
4ddf4d7b
2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/compare2.c: New test.
2000-04-08 Neil Booth <NeilB@earthling.net>
* gcc.dg/cpp-nullchar.c: New test.
...
...
gcc/testsuite/gcc.dg/compare2.c
0 → 100644
View file @
4ddf4d7b
/* Test for a bogus warning on comparison between signed and unsigned.
This was inspired by code in gcc. */
/* { dg-do compile } */
/* { dg-options "-Wsign-compare" } */
int
tf
=
1
;
void
f
(
int
x
,
unsigned
int
y
)
{
/* ?: branches are constants. */
x
>
(
tf
?
64
:
128
);
/* { dg-bogus "signed and unsigned" "case 1" } */
y
>
(
tf
?
64
:
128
);
/* { dg-bogus "signed and unsigned" "case 2" } */
/* ?: branches are (recursively) constants. */
x
>
(
tf
?
64
:
(
tf
?
128
:
256
));
/* { dg-bogus "signed and unsigned" "case 3" } */
y
>
(
tf
?
64
:
(
tf
?
128
:
256
));
/* { dg-bogus "signed and unsigned" "case 4" } */
/* ?: branches are signed constants. */
x
>
(
tf
?
64
:-
1
);
/* { dg-bogus "signed and unsigned" "case 5" } */
y
>
(
tf
?
64
:-
1
);
/* { dg-warning "signed and unsigned" "case 6" } */
/* ?: branches are (recursively) signed constants. */
x
>
(
tf
?
64
:
(
tf
?
128
:-
1
));
/* { dg-bogus "signed and unsigned" "case 7" } */
y
>
(
tf
?
64
:
(
tf
?
128
:-
1
));
/* { dg-warning "signed and unsigned" "case 8" } */
/* Statement expression. */
x
>
({
tf
;
64
;});
/* { dg-bogus "signed and unsigned" "case 9" } */
y
>
({
tf
;
64
;});
/* { dg-bogus "signed and unsigned" "case 10" } */
/* Statement expression with recursive ?: . */
x
>
({
tf
;
tf
?
64
:
(
tf
?
128
:
256
);});
/* { dg-bogus "signed and unsigned" "case 11" } */
y
>
({
tf
;
tf
?
64
:
(
tf
?
128
:
256
);});
/* { dg-bogus "signed and unsigned" "case 12" } */
/* Statement expression with signed ?:. */
x
>
({
tf
;
tf
?
64
:-
1
;});
/* { dg-bogus "signed and unsigned" "case 13" } */
y
>
({
tf
;
tf
?
64
:-
1
;});
/* { dg-warning "signed and unsigned" "case 14" } */
/* Statement expression with recursive signed ?:. */
x
>
({
tf
;
tf
?
64
:
(
tf
?
128
:-
1
);});
/* { dg-bogus "signed and unsigned" "case 15" } */
y
>
({
tf
;
tf
?
64
:
(
tf
?
128
:-
1
);});
/* { dg-warning "signed and unsigned" "case 16" } */
/* ?: branches are constants. */
tf
?
x
:
(
tf
?
64
:
32
);
/* { dg-bogus "conditional expression" "case 17" } */
tf
?
y
:
(
tf
?
64
:
32
);
/* { dg-bogus "conditional expression" "case 18" } */
/* ?: branches are signed constants. */
tf
?
x
:
(
tf
?
64
:-
1
);
/* { dg-bogus "conditional expression" "case 19" } */
tf
?
y
:
(
tf
?
64
:-
1
);
/* { dg-warning "conditional expression" "case 20" } */
/* ?: branches are (recursively) constants. */
tf
?
x
:
(
tf
?
64
:
(
tf
?
128
:
256
));
/* { dg-bogus "conditional expression" "case 21" } */
tf
?
y
:
(
tf
?
64
:
(
tf
?
128
:
256
));
/* { dg-bogus "conditional expression" "case 22" } */
/* ?: branches are (recursively) signed constants. */
tf
?
x
:
(
tf
?
64
:
(
tf
?
128
:-
1
));
/* { dg-bogus "conditional expression" "case 23" } */
tf
?
y
:
(
tf
?
64
:
(
tf
?
128
:-
1
));
/* { dg-warning "conditional expression" "case 24" } */
}
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