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
45f22fa2
Commit
45f22fa2
authored
Oct 06, 1997
by
Brendan Kehoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missing tests, put in various test adjustments from devo
From-SVN: r15850
parent
3f2270ec
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
140 additions
and
2 deletions
+140
-2
gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C
+1
-1
gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
+3
-1
gcc/testsuite/g++.old-deja/g++.law/visibility1.C
+68
-0
gcc/testsuite/g++.old-deja/g++.law/visibility2.C
+68
-0
No files found.
gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C
View file @
45f22fa2
// Build don't link:
// prms-id: 12475
enum
huh
{
start
=-
2147483648
,
next
};
enum
huh
{
start
=-
2147483648
,
next
};
// WARNING -
gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
View file @
45f22fa2
...
...
@@ -17,7 +17,9 @@ main() {
foo
(
4
,
-
37
,
14
.
39
,
14
.
38
);
}
static
void
foo
(
int
i
,
int
j
,
double
x
,
double
y
)
{
// ERROR - extern
// 971006 we no longer give an error for this since we emit a hard error
// about the declaration above
static
void
foo
(
int
i
,
int
j
,
double
x
,
double
y
)
{
cout
<<
"Max(int): "
<<
max
(
i
,
j
)
<<
" Max(double): "
<<
max
(
x
,
y
)
<<
'\n'
;
...
...
gcc/testsuite/g++.old-deja/g++.law/visibility1.C
0 → 100644
View file @
45f22fa2
// Build don't link:
// GROUPS passed visibility
#include <iostream.h>
class
base
{
//==========
void
base_priv
(
char
*
n
)
{
cout
<<
"base_priv called from: "
<<
n
<<
"
\n
"
;
};
protected
:
void
base_prot
(
char
*
n
)
{
cout
<<
"base_prot called from: "
<<
n
<<
"
\n
"
;
};
public
:
void
base_publ
(
char
*
n
)
{
cout
<<
"base_publ called from: "
<<
n
<<
"
\n
"
;
};
void
test
(
char
*
n
)
{
base_publ
(
n
);
base_prot
(
n
);
base_priv
(
n
);
}
};
// class base
class
derived
:
private
base
{
// Make this public,
//============================ // and we don't get an error
friend
void
derived_friend
();
public
:
void
test
(
char
*
n
)
{
base_publ
(
n
);
base_prot
(
n
);}
};
// class derived
void
derived_friend
()
//--------------
{
derived
pd
;
pd
.
base_publ
(
"friend of derived class"
);
// Compiler error here
pd
.
base_prot
(
"friend of derived class"
);
}
main
(
int
argc
,
char
*
argv
[])
//==========================
{
base
b
;
b
.
base_publ
(
"base class object"
);
b
.
test
(
"member of base class object"
);
cout
<<
"
\n
"
;
derived
pd
;
pd
.
test
(
"member of derived class object"
);
derived_friend
();
cout
<<
"
\n
"
;
}
/* main */
gcc/testsuite/g++.old-deja/g++.law/visibility2.C
0 → 100644
View file @
45f22fa2
// Build don't link:
// GROUPS passed visibility
#include <iostream.h>
class
base
{
//==========
void
base_priv
(
char
*
n
)
{
cout
<<
"base_priv called from: "
<<
n
<<
"
\n
"
;
};
protected
:
void
base_prot
(
char
*
n
)
{
cout
<<
"base_prot called from: "
<<
n
<<
"
\n
"
;
};
public
:
void
base_publ
(
char
*
n
)
{
cout
<<
"base_publ called from: "
<<
n
<<
"
\n
"
;
};
void
test
(
char
*
n
)
{
base_publ
(
n
);
base_prot
(
n
);
base_priv
(
n
);
}
};
// class base
class
derived
:
public
base
{
// Make this public,
//============================ // and we don't get an error
friend
void
derived_friend
();
public
:
void
test
(
char
*
n
)
{
base_publ
(
n
);
base_prot
(
n
);}
};
// class derived
void
derived_friend
()
//--------------
{
derived
pd
;
pd
.
base_publ
(
"friend of derived class"
);
// Compiler error here
pd
.
base_prot
(
"friend of derived class"
);
}
main
(
int
argc
,
char
*
argv
[])
//==========================
{
base
b
;
b
.
base_publ
(
"base class object"
);
b
.
test
(
"member of base class object"
);
cout
<<
"
\n
"
;
derived
pd
;
pd
.
test
(
"member of derived class object"
);
derived_friend
();
cout
<<
"
\n
"
;
}
/* main */
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