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
3e69e63b
Commit
3e69e63b
authored
Jan 03, 2005
by
Arnaud Charlet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* i-c.adb (To_C): Raise CE if string is null and Append_Null
From-SVN: r92839
parent
d9246d2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
gcc/ada/i-c.adb
+8
-9
No files found.
gcc/ada/i-c.adb
View file @
3e69e63b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
--
--
--
--
--
B
o
d
y
--
--
B
o
d
y
--
--
--
--
--
--
Copyright
(
C
)
1992
-
200
1
Free
Software
Foundation
,
Inc
.
--
--
Copyright
(
C
)
1992
-
200
4
Free
Software
Foundation
,
Inc
.
--
--
--
--
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
...
@@ -289,21 +289,20 @@ package body Interfaces.C is
...
@@ -289,21 +289,20 @@ package body Interfaces.C is
return
R
;
return
R
;
end
;
end
;
else
--
Append_Nul
is
False
--
Append_Nul
False
else
--
A
nasty
case
,
if
the
string
is
null
,
we
must
return
--
A
nasty
case
,
if
the
string
is
null
,
we
must
return
--
a
null
char_array
.
The
lower
bound
of
this
array
is
--
a
null
char_array
.
The
lower
bound
of
this
array
is
--
required
to
be
zero
(
RM
B
.3
(
50
))
but
that
is
of
course
--
required
to
be
zero
(
RM
B
.3
(
50
))
but
that
is
of
course
--
impossible
given
that
size_t
is
unsigned
.
This
needs
--
impossible
given
that
size_t
is
unsigned
.
According
to
--
A
RG
resolution
,
but
for
now
GNAT
returns
bounds
1
..
0
--
A
da
2005
AI
-
258
,
the
result
is
to
raise
Constraint_Error
.
if
Item
'Length = 0 then
if
Item
'Length = 0 then
declare
raise Constraint_Error;
R : char_array (1 .. 0);
begin
-- Normal case
return R;
end;
else
else
declare
declare
...
...
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