aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-10-18 21:25:21 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-10-18 21:25:21 +0000
commit1cc0507d4c4ac6799ad44f3804c615efaf72e268 (patch)
tree0769a04922654613317a07a6b2f817cda89a8b9e /libgfortran/intrinsics
parentddc4af9c164140e3a6bcbbe448c7cd50719845c8 (diff)
downloadgcc-1cc0507d4c4ac6799ad44f3804c615efaf72e268.zip
gcc-1cc0507d4c4ac6799ad44f3804c615efaf72e268.tar.gz
gcc-1cc0507d4c4ac6799ad44f3804c615efaf72e268.tar.bz2
re PR fortran/32021 (Fix,document,remove GFORTRAN_* environment variables)
PR libfortran/32021 * runtime/backtrace.c (local_strcasestr): Protect by appropriate macros. * runtime/main.c (cleanup): Cast argument to free. * intrinsics/spread_generic.c (spread_internal): Match runtime_error arguments and format. * intrinsics/signal.c (alarm_sub_int_i4, alarm_sub_int_i8): Cast pointers to avoid warnings. From-SVN: r129463
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r--libgfortran/intrinsics/signal.c8
-rw-r--r--libgfortran/intrinsics/spread_generic.c11
2 files changed, 10 insertions, 9 deletions
diff --git a/libgfortran/intrinsics/signal.c b/libgfortran/intrinsics/signal.c
index 2e28b54..84565e8 100644
--- a/libgfortran/intrinsics/signal.c
+++ b/libgfortran/intrinsics/signal.c
@@ -198,14 +198,14 @@ alarm_sub_int_i4 (int *seconds, int *handler, GFC_INTEGER_4 *status)
#if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL)
if (status != NULL)
{
- if (signal (SIGALRM, (void (*)(int)) *handler) == SIG_ERR)
+ if (signal (SIGALRM, (void (*)(int)) (INTPTR_T) *handler) == SIG_ERR)
*status = -1;
else
*status = alarm (*seconds);
}
else
{
- signal (SIGALRM, (void (*)(int)) *handler);
+ signal (SIGALRM, (void (*)(int)) (INTPTR_T) *handler);
alarm (*seconds);
}
#else
@@ -226,14 +226,14 @@ alarm_sub_int_i8 (int *seconds, int *handler, GFC_INTEGER_8 *status)
#if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL)
if (status != NULL)
{
- if (signal (SIGALRM, (void (*)(int)) *handler) == SIG_ERR)
+ if (signal (SIGALRM, (void (*)(int)) (INTPTR_T) *handler) == SIG_ERR)
*status = -1;
else
*status = alarm (*seconds);
}
else
{
- signal (SIGALRM, (void (*)(int)) *handler);
+ signal (SIGALRM, (void (*)(int)) (INTPTR_T) *handler);
alarm (*seconds);
}
#else
diff --git a/libgfortran/intrinsics/spread_generic.c b/libgfortran/intrinsics/spread_generic.c
index 3752717..4be0a16 100644
--- a/libgfortran/intrinsics/spread_generic.c
+++ b/libgfortran/intrinsics/spread_generic.c
@@ -131,9 +131,9 @@ spread_internal (gfc_array_char *ret, const gfc_array_char *source,
if (ret_extent != ncopies)
runtime_error("Incorrect extent in return value of SPREAD"
- " intrinsic in dimension %d: is %ld,"
- " should be %ld", n+1, (long int) ret_extent,
- (long int) ncopies);
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) ncopies);
}
else
{
@@ -142,8 +142,9 @@ spread_internal (gfc_array_char *ret, const gfc_array_char *source,
- source->dim[dim].lbound;
if (ret_extent != extent[dim])
runtime_error("Incorrect extent in return value of SPREAD"
- " intrinsic in dimension %d: is %ld,"
- " should be %ld", n+1, (long int) ret_extent,
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent,
(long int) extent[dim]);
if (extent[dim] <= 0)