Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
9069ac95
Commit
9069ac95
authored
Apr 23, 2013
by
Uwe Schulzweida
Browse files
cfortran.h::kill_trailing: wrong result with gcc -O3, use prama for -O2 (bug fix)
parent
b1034dce
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
9069ac95
2013-04-23 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cfortran.h::kill_trailing: wrong result with gcc -O3, use prama for -O2 (bug fix) [report: Luis Kornblueh]
* vlistXXXAttTxt: use cdi fortran datatype CBUF (char *) for the last argument (bug fix) [report: Luis Kornblueh]
2013-04-19 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
src/cfortran.h
View file @
9069ac95
...
...
@@ -461,6 +461,8 @@ for (i=0; i<sizeofcstr/elem_len; i++) {
}
return
cstr
;
}
/* kill the trailing char t's in string s. */
#pragma GCC push_options
#pragma GCC optimize ("O2")
#ifndef __CF__KnR
static
char
*
kill_trailing
(
char
*
s
,
char
t
)
#else
...
...
@@ -472,6 +474,7 @@ if (e>s) { /* Need this to handle NULL string.*/
while
(
e
>
s
&&
*--
e
==
t
);
/* Don't follow t's past beginning. */
e
[
*
e
==
t
?
0
:
1
]
=
'\0'
;
/* Handle s[0]=t correctly. */
}
return
s
;
}
#pragma GCC pop_options
/* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally
points to the terminating '\0' of s, but may actually point to anywhere in s.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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