mirror of git://gcc.gnu.org/git/gcc.git
format.c (parse_format_list): Add to ERROR, WARNING, SILENT enumerators NOTIFICATION_ prefix.
2010-03-12 Kai Tietz <kai.tietz@onevision.com> PR/42950 * io/format.c (parse_format_list): Add to ERROR, WARNING, SILENT enumerators NOTIFICATION_ prefix. * runtime/error.c (notification_std): Likewise. * libgfortran.h (notification): Likewise. (GFC_LARGEST_BUF): Check for HAVE_GFC_INTEGER_16. From-SVN: r157407
This commit is contained in:
parent
6ac0538d37
commit
b2ef02df53
|
@ -1,3 +1,12 @@
|
||||||
|
2010-03-12 Kai Tietz <kai.tietz@onevision.com>
|
||||||
|
|
||||||
|
PR/42950
|
||||||
|
* io/format.c (parse_format_list): Add to ERROR, WARNING,
|
||||||
|
SILENT enumerators NOTIFICATION_ prefix.
|
||||||
|
* runtime/error.c (notification_std): Likewise.
|
||||||
|
* libgfortran.h (notification): Likewise.
|
||||||
|
(GFC_LARGEST_BUF): Check for HAVE_GFC_INTEGER_16.
|
||||||
|
|
||||||
2010-03-11 Tobias Burnus <burnus@net-b.de>
|
2010-03-11 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
PR fortran/43228
|
PR fortran/43228
|
||||||
|
|
|
@ -863,7 +863,7 @@ parse_format_list (st_parameter_dt *dtp, bool *save_ok)
|
||||||
t = format_lex (fmt);
|
t = format_lex (fmt);
|
||||||
if (t != FMT_POSINT)
|
if (t != FMT_POSINT)
|
||||||
{
|
{
|
||||||
if (notification_std(GFC_STD_GNU) == ERROR)
|
if (notification_std(GFC_STD_GNU) == NOTIFICATION_ERROR)
|
||||||
{
|
{
|
||||||
fmt->error = posint_required;
|
fmt->error = posint_required;
|
||||||
goto finished;
|
goto finished;
|
||||||
|
@ -912,7 +912,7 @@ parse_format_list (st_parameter_dt *dtp, bool *save_ok)
|
||||||
u = format_lex (fmt);
|
u = format_lex (fmt);
|
||||||
if (t == FMT_G && u == FMT_ZERO)
|
if (t == FMT_G && u == FMT_ZERO)
|
||||||
{
|
{
|
||||||
if (notification_std (GFC_STD_F2008) == ERROR
|
if (notification_std (GFC_STD_F2008) == NOTIFICATION_ERROR
|
||||||
|| dtp->u.p.mode == READING)
|
|| dtp->u.p.mode == READING)
|
||||||
{
|
{
|
||||||
fmt->error = zero_width;
|
fmt->error = zero_width;
|
||||||
|
|
|
@ -586,7 +586,7 @@ st_option;
|
||||||
that were given (-std=, -pedantic) we should issue an error, a warning
|
that were given (-std=, -pedantic) we should issue an error, a warning
|
||||||
or nothing. */
|
or nothing. */
|
||||||
typedef enum
|
typedef enum
|
||||||
{ SILENT, WARNING, ERROR }
|
{ NOTIFICATION_SILENT, NOTIFICATION_WARNING, NOTIFICATION_ERROR }
|
||||||
notification;
|
notification;
|
||||||
|
|
||||||
/* This is returned by notify_std and several io functions. */
|
/* This is returned by notify_std and several io functions. */
|
||||||
|
@ -701,6 +701,8 @@ internal_proto(show_backtrace);
|
||||||
|
|
||||||
#if defined(HAVE_GFC_REAL_16)
|
#if defined(HAVE_GFC_REAL_16)
|
||||||
#define GFC_LARGEST_BUF (sizeof (GFC_REAL_16))
|
#define GFC_LARGEST_BUF (sizeof (GFC_REAL_16))
|
||||||
|
#elif defined(HAVE_GFC_INTEGER_16)
|
||||||
|
#define GFC_LARGEST_BUF (sizeof (GFC_INTEGER_LARGEST))
|
||||||
#elif defined(HAVE_GFC_REAL_10)
|
#elif defined(HAVE_GFC_REAL_10)
|
||||||
#define GFC_LARGEST_BUF (sizeof (GFC_REAL_10))
|
#define GFC_LARGEST_BUF (sizeof (GFC_REAL_10))
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -452,13 +452,13 @@ notification_std (int std)
|
||||||
int warning;
|
int warning;
|
||||||
|
|
||||||
if (!compile_options.pedantic)
|
if (!compile_options.pedantic)
|
||||||
return SILENT;
|
return NOTIFICATION_SILENT;
|
||||||
|
|
||||||
warning = compile_options.warn_std & std;
|
warning = compile_options.warn_std & std;
|
||||||
if ((compile_options.allow_std & std) != 0 && !warning)
|
if ((compile_options.allow_std & std) != 0 && !warning)
|
||||||
return SILENT;
|
return NOTIFICATION_SILENT;
|
||||||
|
|
||||||
return warning ? WARNING : ERROR;
|
return warning ? NOTIFICATION_WARNING : NOTIFICATION_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue