@@ -956,10 +956,10 @@ gfc_check_argument_var_dependency (gfc_expr *var, sym_intent intent,
If a dependency is found in the case
elemental == ELEM_CHECK_VARIABLE, we will generate
a temporary, so we don't need to bother the user. */
- gfc_warning ("INTENT(%s) actual argument at %L might "
- "interfere with actual argument at %L.",
- intent == INTENT_OUT ? "OUT" : "INOUT",
- &var->where, &expr->where);
+ gfc_warning_1 ("INTENT(%s) actual argument at %L might "
+ "interfere with actual argument at %L.",
+ intent == INTENT_OUT ? "OUT" : "INOUT",
+ &var->where, &expr->where);
}
return 0;
}
@@ -804,35 +804,6 @@ gfc_increment_error_count (void)
}
-/* Issue a warning. */
-
-void
-gfc_warning (const char *gmsgid, ...)
-{
- va_list argp;
-
- if (inhibit_warnings)
- return;
-
- warning_buffer.flag = 1;
- warning_buffer.index = 0;
- cur_error_buffer = &warning_buffer;
-
- va_start (argp, gmsgid);
- error_print (_("Warning:"), _(gmsgid), argp);
- va_end (argp);
-
- error_char ('\0');
-
- if (buffer_flag == 0)
- {
- warnings++;
- if (warnings_are_errors)
- gfc_increment_error_count();
- }
-}
-
-
/* Whether, for a feature included in a given standard set (GFC_STD_*),
we should issue an error or a warning, or be quiet. */
@@ -2690,7 +2690,10 @@ void gfc_buffer_error (int);
const char *gfc_print_wide_char (gfc_char_t);
-void gfc_warning (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
+/* Contrary to gfc_warning_now, gfc_warning could be buffered. However, it
+ turned out that the buffer is never dropped but always printed. */
+#define gfc_warning_1 gfc_warning_now_1
+#define gfc_warning gfc_warning_now
void gfc_warning_now_1 (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
bool gfc_warning_now (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
bool gfc_warning_now (int opt, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
@@ -18,7 +18,7 @@
end do
call foo j bar
! gfc_warning:
- r2(4) = 0 ! { dg-warning "is out of bounds" }
+ r2(4) = 0 ! { dg-error "is out of bounds" }
goto 3 45
end
@@ -17,7 +17,7 @@
implicit none
! gfc_warning:
-1234 complex :: cplx ! { dg-warning "defined but cannot be used" }
+1234 complex :: cplx ! { dg-error "defined but cannot be used" }
cplx = 20.
! gfc_warning_now: