You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flang] Further refine errors vs warnings for ambiguous generics
Ensure that the compiler emits a hard error for a generic interface
with ambiguous specific procedures when it is declared as such, and
the ambiguity doesn't involve optional or unlimited polymorphic dummy
data arguments. But: emit an optional portability warning when the
ambiguity in the generic interface is due to USE association's merging
of multiple generics, as USE association may involve modules not under
control of the programmer; we'll emit a hard error message if any
the actual arguments in a particular reference to the generic procedure
doesn't resolve to exactly one specific procedure. And don't emit
warnings when potential ambiguity due to USE association is taking
place in a module file; the warnings, if any, will have been produced
when the module file was compiled.
? "Generic '%s' may not have specific procedures '%s' and '%s' as their interfaces are not distinguishable"_err_en_US
3564
3576
: "Generic '%s' should not have specific procedures '%s' and '%s' as their interfaces are not distinguishable by the rules in the standard"_port_en_US,
? "USE-associated generic '%s' may not have specific procedures '%s' and '%s' as their interfaces are not distinguishable"_err_en_US
3570
-
: "USE-associated generic '%s' should not have specific procedures '%s' and '%s' as their interfaces are not distinguishable by the incomplete rules in the standard"_port_en_US,
3580
+
isHardConflict
3581
+
? (isWarning
3582
+
? "USE-associated generic '%s' should not have specific procedures '%s' and '%s' as their interfaces are not distinguishable"_warn_en_US
3583
+
: "USE-associated generic '%s' may not have specific procedures '%s' and '%s' as their interfaces are not distinguishable"_err_en_US)
3584
+
: "USE-associated generic '%s' should not have specific procedures '%s' and '%s' as their interfaces are not distinguishable by the rules in the standard"_port_en_US,
0 commit comments