aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Burley <craig@jcb-sc.com>1999-03-05 23:40:12 +0000
committerCraig Burley <burley@gcc.gnu.org>1999-03-05 18:40:12 -0500
commit411d4e28f8dc0deb8d175e6e9ddf93e528b2e532 (patch)
tree7fc5b956543a0ff46d7d10cd0432a5c539ced393
parent40ae436b588ba796cdcdd682a2435fd4223687ba (diff)
downloadgcc-411d4e28f8dc0deb8d175e6e9ddf93e528b2e532.zip
gcc-411d4e28f8dc0deb8d175e6e9ddf93e528b2e532.tar.gz
gcc-411d4e28f8dc0deb8d175e6e9ddf93e528b2e532.tar.bz2
Warn about invoking non-Y2K-compliant intrinsics
From-SVN: r25609
-rw-r--r--gcc/f/ChangeLog19
-rw-r--r--gcc/f/bad.def2
-rw-r--r--gcc/f/com-rt.def4
-rw-r--r--gcc/f/g77.texi134
-rw-r--r--gcc/f/intdoc.c11
-rw-r--r--gcc/f/intrin.c33
-rw-r--r--gcc/f/intrin.def10
-rw-r--r--gcc/f/intrin.h7
-rw-r--r--gcc/f/news.texi12
-rw-r--r--gcc/f/version.c2
-rw-r--r--libf2c/ChangeLog14
-rw-r--r--libf2c/Makefile.in5
-rw-r--r--libf2c/f2cext.c38
-rw-r--r--libf2c/libU77/Version.c2
-rw-r--r--libf2c/libU77/date_.c2
-rw-r--r--libf2c/libU77/vxtidate_.c4
16 files changed, 278 insertions, 21 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 0eb4cdc..3db76df 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,22 @@
+Sat Mar 6 02:28:35 1999 Craig Burley <craig@jcb-sc.com>
+
+ Warn about non-Y2K-compliant intrinsics:
+ * bad.def (FFEBAD_INTRINSIC_Y2KBAD): New diagnostic.
+ * intrin.def (FFEINTRIN_impDATE, FFEINTRIN_impIDATE_vxt):
+ Use new DEFIMPY macro to flag these as non-Y2K-compliant.
+ * intdoc.c (DEFIMPY): Support new Y2K macro.
+ * intrin.h (DEFIMPY): Ditto.
+ * intrin.c (DEFIMPY): Ditto.
+ (ffeintrin_fulfill_generic, ffeintrin_fulfill_specific):
+ Warn about invocation of non-Y2K-compliant intrinsic.
+ * com-rt.def (FFECOM_gfrtDATE, FFECOM_gfrtVXTIDATE):
+ Rename external procedure names, to keep previously-
+ compiled (sans-new-warnings) code from linking to
+ new library.
+ * g77.texi: Document all this stuff.
+ * news.texi: Spread the joy.
+ * version.c: Bump version.
+
Fri Mar 5 13:22:44 1999 Craig Burley <craig@jcb-sc.com>
* news.texi: Relocate IDATE (VXT) fix: we put it in 1.1.2
diff --git a/gcc/f/bad.def b/gcc/f/bad.def
index 6d96110..430c283 100644
--- a/gcc/f/bad.def
+++ b/gcc/f/bad.def
@@ -700,6 +700,8 @@ FFEBAD_MSGS1 (FFEBAD_ARRAY_LARGE, FATAL,
"Array `%A' at %0 is too large to handle")
FFEBAD_MSGS1 (FFEBAD_SFUNC_UNUSED, WARN,
"Statement function `%A' defined at %0 is not used")
+FFEBAD_MSGS1 (FFEBAD_INTRINSIC_Y2KBAD, WARN,
+"Intrinsic `%A', invoked at %0, known to be non-Y2K-compliant [info -f g77 M Y2KBAD]")
#undef INFORM
#undef TRIVIAL
diff --git a/gcc/f/com-rt.def b/gcc/f/com-rt.def
index 8364457..5c08fee 100644
--- a/gcc/f/com-rt.def
+++ b/gcc/f/com-rt.def
@@ -142,7 +142,7 @@ DEFGFRT (FFECOM_gfrtDACOS, "d_acos", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDASIN, "d_asin", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATAN, "d_atan", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATAN2, "d_atn2", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE)
-DEFGFRT (FFECOM_gfrtDATE, "G77_date_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
+DEFGFRT (FFECOM_gfrtDATE, "G77_date_y2kbug_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtDATE_AND_TIME, "G77_date_and_time_0", FFECOM_rttypeVOID_, "&a&a&a&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtL_BESJ0, "j0", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtL_BESJ1, "j1", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE)
@@ -242,7 +242,7 @@ DEFGFRT (FFECOM_gfrtTIME, "G77_time_0", FFECOM_rttypeLONGINT_, 0, FALSE, FALSE)
DEFGFRT (FFECOM_gfrtTTYNAM, "G77_ttynam_0", FFECOM_rttypeCHARACTER_, "&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtUNLINK, "G77_unlink_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtUMASK, "G77_umask_0", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE)
-DEFGFRT (FFECOM_gfrtVXTIDATE, "G77_vxtidate_0", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE)
+DEFGFRT (FFECOM_gfrtVXTIDATE, "G77_vxtidate_y2kbug_0", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtVXTTIME, "G77_vxttime_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtCDABS, "z_abs", FFECOM_rttypeDOUBLE_, "&e", FALSE, FALSE)
DEFGFRT (FFECOM_gfrtCDCOS, "z_cos", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE)
diff --git a/gcc/f/g77.texi b/gcc/f/g77.texi
index febe727..9997fa2 100644
--- a/gcc/f/g77.texi
+++ b/gcc/f/g77.texi
@@ -14,7 +14,7 @@
@c %**start of header
@setfilename g77.info
-@set last-up-date 1999-03-03
+@set last-up-date 1999-03-06
@set version-g77 0.5.24
@set email-general egcs@@egcs.cygnus.com
@set email-bugs egcs-bugs@@egcs.cygnus.com
@@ -8145,6 +8145,119 @@ on at least some systems:
@ref{Date Intrinsic},
@ref{IDate Intrinsic (VXT)}.
+@cindex y2kbuggy
+@cindex date_y2kbuggy_0
+@cindex vxtidate_y2kbuggy_0
+@cindex G77_date_y2kbuggy_0
+@cindex G77_vxtidate_y2kbuggy_0
+The @code{libg2c} library
+shipped with any @code{g77} that warns
+about invocation of a non-Y2K-compliant intrinsic
+has renamed the @samp{EXTERNAL} procedure names
+of those intrinsics.
+This is done so that
+the @code{libg2c} implementations of these intrinsics
+cannot be directly linked to
+as @samp{EXTERNAL} names
+(which normally would avoid the non-Y2K-intrinsic warning).
+
+The renamed forms of the @samp{EXTERNAL} names
+of these renamed procedures
+may be linked to
+by appending the string @samp{_y2kbug}
+to the name of the procedure
+in the source code.
+For example:
+
+@smallexample
+CHARACTER*20 STR
+INTEGER YY, MM, DD
+EXTERNAL DATE_Y2KBUG, VXTIDATE_Y2KBUG
+CALL DATE_Y2KBUG (STR)
+CALL VXTIDATE_Y2KBUG (MM, DD, YY)
+@end smallexample
+
+(Note that the @samp{EXTERNAL} statement
+is not actually required,
+since the modified names are not recognized as intrinsics
+by the current version of @code{g77}.
+But it is shown in this specific case,
+for purposes of illustration.)
+
+The renaming of @samp{EXTERNAL} procedure names of these intrinsics
+causes unresolved references at link time.
+For example, @samp{EXTERNAL DATE; CALL DATE(STR)}
+is normally compiled by @code{g77}
+as, in C, @samp{date_(&str, 20);}.
+This, in turn, links to the @samp{date_} procedure
+in the @samp{libE77} portion of @code{libg2c},
+which purposely calls a nonexistent procedure
+named @samp{G77_date_y2kbuggy_0}.
+The resulting link-time error is designed, via this name,
+to encourage the programmer to look up the
+index entries to this portion of the @code{g77} documentation.
+
+Generally, we recommend that the @samp{EXTERNAL} method
+of invoking procedures in @code{libg2c}
+@emph{not} be used.
+When used, some of the correctness checking
+normally performed by @code{g77}
+is skipped.
+
+In particular, it is probably better to use the
+@samp{INTRINSIC} method of invoking
+non-Y2K-compliant procedures,
+so anyone compiling the code
+can quickly notice the potential Y2K problems
+(via the warnings printing by @code{g77})
+without having to even look at the code itself.
+
+If there are problems linking @code{libg2c}
+to code compiled by @code{g77}
+that involve the string @samp{y2kbug},
+and these are not explained above,
+that probably indicates
+that a version of @code{libg2c}
+older than @code{g77}
+is being linked to,
+or that the new library is being linked
+to code compiled by an older version of @code{g77}.
+
+That's because, as of the version that warns about
+non-Y2K-compliant intrinsic invocation,
+@code{g77} references the @code{libg2c} implementations
+of those intrinsics
+using new names, containing the string @samp{y2kbug}.
+
+So, linking newly-compiled code
+(invoking one of the intrinsics in question)
+to an old library
+might yield an unresolved reference
+to @samp{G77_date_y2kbug_0}.
+(The old library calls it @samp{G77_date_0}.)
+
+Similarly, linking previously-compiled code
+to a new library
+might yield an unresolved reference
+to @samp{G77_vxtidate_0}.
+(The new library calls it @samp{G77_vxtidate_y2kbug_0}.)
+
+The proper fix for the above problems
+is to obtain the latest release of @code{g77}
+and related products
+(including @code{libg2c})
+and install them on all systems,
+then recompile, relink, and install
+(as appropriate)
+all existing Fortran programs.
+
+(Normally, this sort of renaming is steadfastly avoided.
+In this case, however, it seems more important to highlight
+potential Y2K problems
+than to ease the transition
+of potentially non-Y2K-compliant code
+to new versions of @code{g77} and @code{libg2c}.)
+
@node Array Size
@subsection Array Size
@cindex limits, array size
@@ -14756,6 +14869,7 @@ as the above is just a sample, no such section exists.
* LEX:: Various lexer messages
* GLOBALS:: Disagreements about globals.
* LINKFAIL:: When linking @samp{f771} fails.
+* Y2KBAD:: Use of non-Y2K-compliant intrinsic.
@end menu
@node CMPAMBIG
@@ -15327,6 +15441,24 @@ might solve this problem, e.g.@: by adding
BOOT_CFLAGS='-mminimal-toc -O2 -g'
@end smallexample
to the @code{make bootstrap} command line.
+
+@node Y2KBAD
+@section @code{Y2KBAD}
+@cindex Y2K compliance
+@cindex Year 2000 compliance
+
+@noindent
+@smallexample
+Intrinsic `@var{name}', invoked at (^), known to be non-Y2K-compliant@dots{}
+@end smallexample
+
+This diagnostic indicates that
+the specific intrinsic invoked by the name @var{name}
+is known to have an interface
+that is not Year-2000 (Y2K) compliant.
+
+@xref{Year 2000 (Y2K) Problems}.
+
@end ifset
@node Index
diff --git a/gcc/f/intdoc.c b/gcc/f/intdoc.c
index e4f45ca..917fc2e 100644
--- a/gcc/f/intdoc.c
+++ b/gcc/f/intdoc.c
@@ -124,11 +124,13 @@ static struct _ffeintrin_name_ names[] = {
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_gen_ gens[] = {
@@ -137,11 +139,13 @@ static struct _ffeintrin_gen_ gens[] = {
{ NAME, { SPEC1, SPEC2, }, },
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_imp_ imps[] = {
@@ -151,9 +155,13 @@ static struct _ffeintrin_imp_ imps[] = {
#if 0 /* FFECOM_targetCURRENT == FFECOM_targetGCC */
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, FFECOM_gfrt ## GFRT, CONTROL },
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ { NAME, FFECOM_gfrt ## GFRT, CONTROL },
#elif 1 /* FFECOM_targetCURRENT == FFECOM_targetFFE */
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, CONTROL },
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ { NAME, CONTROL },
#else
#error
#endif
@@ -162,6 +170,7 @@ static struct _ffeintrin_imp_ imps[] = {
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_spec_ specs[] = {
@@ -170,10 +179,12 @@ static struct _ffeintrin_spec_ specs[] = {
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
{ NAME, CALLABLE, FAMILY, IMP, },
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
struct cc_pair { ffeintrinImp imp; char *text; };
diff --git a/gcc/f/intrin.c b/gcc/f/intrin.c
index c018b5c..6760be4 100644
--- a/gcc/f/intrin.c
+++ b/gcc/f/intrin.c
@@ -64,6 +64,7 @@ struct _ffeintrin_imp_
ffecomGfrt gfrt_gnu; /* library routine, gnu-callable form. */
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
char *control;
+ char y2kbad;
};
static ffebad ffeintrin_check_ (ffeintrinImp imp, ffebldOp op,
@@ -84,11 +85,13 @@ static struct _ffeintrin_name_ ffeintrin_names_[]
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_gen_ ffeintrin_gens_[]
@@ -99,11 +102,13 @@ static struct _ffeintrin_gen_ ffeintrin_gens_[]
{ NAME, { SPEC1, SPEC2, }, },
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_imp_ ffeintrin_imps_[]
@@ -115,10 +120,15 @@ static struct _ffeintrin_imp_ ffeintrin_imps_[]
#if FFECOM_targetCURRENT == FFECOM_targetGCC
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
{ NAME, FFECOM_gfrt ## GFRTDIRECT, FFECOM_gfrt ## GFRTF2C, \
- FFECOM_gfrt ## GFRTGNU, CONTROL },
+ FFECOM_gfrt ## GFRTGNU, CONTROL, FALSE },
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ { NAME, FFECOM_gfrt ## GFRTDIRECT, FFECOM_gfrt ## GFRTF2C, \
+ FFECOM_gfrt ## GFRTGNU, CONTROL, Y2KBAD },
#elif FFECOM_targetCURRENT == FFECOM_targetFFE
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
- { NAME, CONTROL },
+ { NAME, CONTROL, FALSE },
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ { NAME, CONTROL, Y2KBAD },
#else
#error
#endif
@@ -127,6 +137,7 @@ static struct _ffeintrin_imp_ ffeintrin_imps_[]
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
static struct _ffeintrin_spec_ ffeintrin_specs_[]
@@ -137,10 +148,12 @@ static struct _ffeintrin_spec_ ffeintrin_specs_[]
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \
{ NAME, CALLABLE, FAMILY, IMP, },
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
};
@@ -1374,6 +1387,14 @@ ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t)
ffebad_string (ffeintrin_gens_[gen].name);
ffebad_finish ();
}
+ if (ffeintrin_imps_[imp].y2kbad)
+ {
+ ffebad_start (FFEBAD_INTRINSIC_Y2KBAD);
+ ffebad_here (0, ffelex_token_where_line (t),
+ ffelex_token_where_column (t));
+ ffebad_string (ffeintrin_gens_[gen].name);
+ ffebad_finish ();
+ }
}
}
@@ -1489,6 +1510,14 @@ ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info,
ffebad_string (name);
ffebad_finish ();
}
+ if (ffeintrin_imps_[imp].y2kbad)
+ {
+ ffebad_start (FFEBAD_INTRINSIC_Y2KBAD);
+ ffebad_here (0, ffelex_token_where_line (t),
+ ffelex_token_where_column (t));
+ ffebad_string (name);
+ ffebad_finish ();
+ }
}
}
diff --git a/gcc/f/intrin.def b/gcc/f/intrin.def
index 93df3f1..9d9626b 100644
--- a/gcc/f/intrin.def
+++ b/gcc/f/intrin.def
@@ -3006,6 +3006,12 @@ DEFSPEC (NONE,
CONTROL -- A control string, described below.
+ The DEFIMPY macro specifies the above, plus:
+
+ Y2KBAD -- TRUE if the intrinsic is known to be non-Y2K-compliant,
+ FALSE if it is known to be Y2K-compliant. (In terms of
+ interface and libg2c implementation.)
+
*/
/* The control string has the following format:
@@ -3232,7 +3238,7 @@ DEFIMP (COMPLEX, "COMPLEX", ,,, "C=:*:Real=S*,Imag=S*")
DEFIMP (CPU_TIME, "CPU_TIME", SECOND,,, "--:-:Seconds=R*w")
DEFIMP (CTIME_func, "CTIME_func", CTIME,,, "A1*:-:STime=I*")
DEFIMP (CTIME_subr, "CTIME_subr", CTIME,,, "--:-:Result=A1w,STime=I*")
-DEFIMP (DATE, "DATE", DATE,,, "--:-:Date=A1w")
+DEFIMPY (DATE, "DATE", DATE,,, "--:-:Date=A1w", TRUE)
DEFIMP (DATE_AND_TIME, "DATE_AND_TIME", DATE_AND_TIME,,, "--:-:Date=A1w,Time=?A1w,Zone=?A1w,Values=?I1(8)w")
DEFIMP (DBESJ0, "DBESJ0", L_BESJ0,,, "R2:-:X=R2")
DEFIMP (DBESJ1, "DBESJ1", L_BESJ1,,, "R2:-:X=R2")
@@ -3289,7 +3295,7 @@ DEFIMP (IBCLR, "IBCLR", ,,, "I=:0:I=I*,Pos=I*")
DEFIMP (IBITS, "IBITS", ,,, "I=:0:I=I*,Pos=I*,Len=I*")
DEFIMP (IBSET, "IBSET", ,,, "I=:0:I=I*,Pos=I*")
DEFIMP (IDATE_unix, "IDATE_unix", IDATE,,, "--:-:TArray=I1(3)w")
-DEFIMP (IDATE_vxt, "IDATE_vxt", VXTIDATE,,, "--:-:M=I1w,D=I1w,Y=I1w")
+DEFIMPY (IDATE_vxt, "IDATE_vxt", VXTIDATE,,, "--:-:M=I1w,D=I1w,Y=I1w", TRUE)
DEFIMP (IEOR, "IEOR", ,,, "I=:*:I=I*,J=I*")
DEFIMP (IOR, "IOR", ,,, "I=:*:I=I*,J=I*")
DEFIMP (IERRNO, "IERRNO", IERRNO,,, "I1:-:")
diff --git a/gcc/f/intrin.h b/gcc/f/intrin.h
index 0fb156b..393552d 100644
--- a/gcc/f/intrin.h
+++ b/gcc/f/intrin.h
@@ -51,11 +51,13 @@ typedef enum
#define DEFGEN(CODE,NAME,SPEC1,SPEC2) FFEINTRIN_gen ## CODE,
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
FFEINTRIN_gen
} ffeintrinGen;
@@ -65,11 +67,13 @@ typedef enum
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) FFEINTRIN_spec ## CODE,
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
FFEINTRIN_spec
} ffeintrinSpec;
@@ -80,11 +84,14 @@ typedef enum
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
FFEINTRIN_imp ## CODE,
+#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \
+ FFEINTRIN_imp ## CODE,
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
+#undef DEFIMPY
FFEINTRIN_imp
} ffeintrinImp;
diff --git a/gcc/f/news.texi b/gcc/f/news.texi
index 632fe95..a460fe0 100644
--- a/gcc/f/news.texi
+++ b/gcc/f/news.texi
@@ -9,7 +9,7 @@
@c The text of this file appears in the file BUGS
@c in the G77 distribution, as well as in the G77 manual.
-@c 1999-03-03
+@c 1999-03-06
@ifclear NEWSONLY
@node News
@@ -82,6 +82,16 @@ now are recognized by @code{g77}
as if they ended in @samp{.for} and @samp{.fpp}, respectively.
@item
+@code{g77} now warns about a reference to an intrinsic
+that has an interface that is not Year 2000 (Y2K) compliant.
+Also, the @code{libg2c} has been changed to increase the likelihood
+of catching references to the implementations of these intrinsics
+using the @samp{EXTERNAL} mechanism
+(which would avoid the new warnings).
+
+@xref{Year 2000 (Y2K) Problems}, for more information.
+
+@item
@code{g77} now warns about a reference to a function
when the corresponding @emph{subsequent} function program unit
disagrees with the reference concerning the type of the function.
diff --git a/gcc/f/version.c b/gcc/f/version.c
index 24c6c68..8faaa02 100644
--- a/gcc/f/version.c
+++ b/gcc/f/version.c
@@ -1 +1 @@
-char *ffe_version_string = "0.5.24-19990219";
+char *ffe_version_string = "0.5.24-19990306";
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog
index 55300b0..c070e3a 100644
--- a/libf2c/ChangeLog
+++ b/libf2c/ChangeLog
@@ -1,3 +1,17 @@
+1999-03-06 Craig Burley <craig@jcb-sc.com>
+
+ Rename non-Y2K-compliant intrinsics:
+ * Makefile.in (F2CEXT): Now two versions each of
+ `date' and `vxtidt'.
+ * f2cext.c (date_, vxtidate_): Split into two versions,
+ the existing one calling a new "y2kbuggy" routine that
+ does not exist, and a new one named with "y2kbug" that
+ calls the newly renamed underlying routine.
+ * libU77/date_.c (G77_date_y2kbug_0): Rename from G77_date_0.
+ * libU77/vxtidate_.c (G77_vxtidate_y2kbug_0): Rename from
+ G77_vxtidate_0.
+ * libU77/Version.c: Bump version.
+
1999-03-03 Craig Burley <craig@jcb-sc.com>
* libU77/vxtidate_.c (G77_vxtidate_0): Truncate
diff --git a/libf2c/Makefile.in b/libf2c/Makefile.in
index 3b52019..7c8d880 100644
--- a/libf2c/Makefile.in
+++ b/libf2c/Makefile.in
@@ -75,12 +75,13 @@ SUBDIRS = libI77 libF77 libU77
F2CEXT = abort derf derfc ef1asc ef1cmc erf erfc exit getarg getenv iargc \
signal system flush ftell fseek access besj0 besj1 besjn besy0 besy1 \
- besyn chdir chmod ctime date dbesj0 dbesj1 dbesjn dbesy0 dbesy1 dbesyn \
+ besyn chdir chmod ctime dbesj0 dbesj1 dbesjn dbesy0 dbesy1 dbesyn \
dtime etime fdate fgetc fget flush1 fnum fputc fput fstat gerror \
getcwd getgid getlog getpid getuid gmtime hostnm idate ierrno irand \
isatty itime kill link lnblnk lstat ltime mclock perror rand rename \
secnds second sleep srand stat symlnk time ttynam umask unlink \
- vxtidt vxttim alarm
+ vxttim alarm \
+ date_y2kbuggy date_y2kbug vxtidt_y2kbuggy vxtidt_y2kbug
.SUFFIXES:
diff --git a/libf2c/f2cext.c b/libf2c/f2cext.c
index eb18ee2..56f9490 100644
--- a/libf2c/f2cext.c
+++ b/libf2c/f2cext.c
@@ -203,10 +203,23 @@ void ctime_ (char *chtime, const ftnlen Lchtime, longint *xstime) {
}
#endif
-#ifdef Ldate
+#ifdef Ldate_y2kbuggy
int date_ (char *buf, ftnlen buf_len) {
- extern int G77_date_0 (char *buf, ftnlen buf_len);
- return G77_date_0 (buf, buf_len);
+ /* Fail to link, so user sees attempt to invoke non-Y2K-compliant
+ routine. */
+ extern int G77_date_y2kbuggy_0 (char *buf, ftnlen buf_len);
+ return G77_date_y2kbuggy_0 (buf, buf_len);
+}
+#endif
+
+#ifdef Ldate_y2kbug
+int date_y2kbug__ (char *buf, ftnlen buf_len) {
+ /* If user wants to invoke the non-Y2K-compliant routine via
+ an `EXTERNAL' interface, avoiding the warning via g77's
+ `INTRINSIC' interface, force coding of "y2kbug" string in
+ user's program. */
+ extern int G77_date_y2kbug_0 (char *buf, ftnlen buf_len);
+ return G77_date_y2kbug_0 (buf, buf_len);
}
#endif
@@ -540,10 +553,23 @@ integer unlink_ (const char *str, const ftnlen Lstr) {
}
#endif
-#ifdef Lvxtidt
+#ifdef Lvxtidt_y2kbuggy
int vxtidate_ (integer *m, integer *d, integer *y) {
- extern int G77_vxtidate_0 (integer *m, integer *d, integer *y);
- return G77_vxtidate_0 (m, d, y);
+ /* Fail to link, so user sees attempt to invoke non-Y2K-compliant
+ routine. */
+ extern int G77_vxtidate_y2kbuggy_0 (integer *m, integer *d, integer *y);
+ return G77_vxtidate_y2kbuggy_0 (m, d, y);
+}
+#endif
+
+#ifdef Lvxtidt_y2kbug
+int vxtidate_y2kbug__ (integer *m, integer *d, integer *y) {
+ /* If user wants to invoke the non-Y2K-compliant routine via
+ an `EXTERNAL' interface, avoiding the warning via g77's
+ `INTRINSIC' interface, force coding of "y2kbug" string in
+ user's program. */
+ extern int G77_vxtidate_y2kbug_0 (integer *m, integer *d, integer *y);
+ return G77_vxtidate_y2kbug_0 (m, d, y);
}
#endif
diff --git a/libf2c/libU77/Version.c b/libf2c/libU77/Version.c
index 649d7d6..1efd510 100644
--- a/libf2c/libU77/Version.c
+++ b/libf2c/libU77/Version.c
@@ -1,6 +1,6 @@
static char junk[] = "\n@(#) LIBU77 VERSION 19980709\n";
-char __G77_LIBU77_VERSION__[] = "0.5.24-19990115";
+char __G77_LIBU77_VERSION__[] = "0.5.24-19990306";
#include <stdio.h>
diff --git a/libf2c/libU77/date_.c b/libf2c/libU77/date_.c
index 8426edc..1153765 100644
--- a/libf2c/libU77/date_.c
+++ b/libf2c/libU77/date_.c
@@ -9,7 +9,7 @@
static integer c__5 = 5;
-/* Subroutine */ int G77_date_0 (char *buf, ftnlen buf_len)
+/* Subroutine */ int G77_date_y2kbug_0 (char *buf, ftnlen buf_len)
{
/* System generated locals */
address a__1[5];
diff --git a/libf2c/libU77/vxtidate_.c b/libf2c/libU77/vxtidate_.c
index 03133ff..dc817a7 100644
--- a/libf2c/libU77/vxtidate_.c
+++ b/libf2c/libU77/vxtidate_.c
@@ -38,10 +38,10 @@ Boston, MA 02111-1307, USA. */
/* Subroutine */
#ifdef KR_headers
-int G77_vxtidate_0 (m, d, y)
+int G77_vxtidate_y2kbug_0 (m, d, y)
integer *y, *m, *d;
#else
-int G77_vxtidate_0 (integer *m, integer *d, integer *y)
+int G77_vxtidate_y2kbug_0 (integer *m, integer *d, integer *y)
#endif
{
struct tm *lt;