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
5d0c4740
Commit
5d0c4740
authored
Aug 28, 1998
by
Brendan Kehoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd `_eb91_' in front of the typenames, to avoid linux hiccups
From-SVN: r22058
parent
06424989
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
gcc/testsuite/g++.old-deja/g++.robertl/eb91.C
+11
-11
No files found.
gcc/testsuite/g++.old-deja/g++.robertl/eb91.C
View file @
5d0c4740
#include <sys/types.h>
#include <algorithm>
typedef
short
int16_t
;
typedef
char
int8_t
;
typedef
unsigned
char
u_int8_t
;
typedef
unsigned
short
u_int16_t
;
typedef
short
_eb91_
int16_t
;
typedef
char
_eb91_
int8_t
;
typedef
unsigned
char
_eb91_
u_int8_t
;
typedef
unsigned
short
_eb91_
u_int16_t
;
template
<
class
INT
>
class
other_endian
...
...
@@ -13,22 +13,22 @@ private:
INT
value
;
u_int16_t
change_endian
(
u_int16_t
x
)
_eb91_u_int16_t
change_endian
(
_eb91_
u_int16_t
x
)
{
union
{
u_int16_t
i
;
u_int8_t
c
[
2
];
_eb91_
u_int16_t
i
;
_eb91_
u_int8_t
c
[
2
];
}
val
;
val
.
i
=
x
;
swap
(
val
.
c
[
0
],
val
.
c
[
1
]);
return
val
.
i
;
};
int16_t
change_endian
(
int16_t
x
)
_eb91_int16_t
change_endian
(
_eb91_
int16_t
x
)
{
union
{
int16_t
i
;
int8_t
c
[
2
];
_eb91_
int16_t
i
;
_eb91_
int8_t
c
[
2
];
}
val
;
val
.
i
=
x
;
swap
(
val
.
c
[
0
],
val
.
c
[
1
]);
...
...
@@ -80,6 +80,6 @@ public:
int
main
()
{
other_endian
<
u_int16_t
>
little_endian_16_bit_int
;
other_endian
<
_eb91_
u_int16_t
>
little_endian_16_bit_int
;
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