public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50360] New: [cleanup] use an ENUM for the return values of gfc_dep_compare_expr
@ 2011-09-11 20:43 janus at gcc dot gnu.org
  2015-10-13 18:23 ` [Bug fortran/50360] " dominiq at lps dot ens.fr
  0 siblings, 1 reply; 2+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-11 20:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50360

             Bug #: 50360
           Summary: [cleanup] use an ENUM for the return values of
                    gfc_dep_compare_expr
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janus@gcc.gnu.org
                CC: burnus@gcc.gnu.org, tkoenig@gcc.gnu.org


gfc_dep_compare_expr currently has five possible return values:
   * +1 if e1 > e2
   * 0 if e1 == e2
   * -1 if e1 < e2
   * -2 if the relationship could not be determined
   * -3 if e1 /= e2, but we cannot tell which one is larger.

Tobias notes in http://gcc.gnu.org/ml/fortran/2011-08/msg00159.html:

"Besides that issue, I am wondering whether we shouldn't start to use an ENUM
for those. I think for "<" vs. "==" vs. ">" one can use a number (-1, 0, 1) and
then compare the result against 0 (>0, == 0 etc.).
However, for 5 values, I think it makes sense to do something else otherwise,
someone write "... < 0" which not only matches -1 but also -2 or -3."

Thomas adds in http://gcc.gnu.org/ml/fortran/2011-08/msg00167.html:

"If we really wanted to do this The Right Way, there would be seven
cases to be considered, best expressed as three flags.  I'll call them
CAN_BE_LESS, CAN_BE_EQUAL and CAN_BE_MORE ..."


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/50360] [cleanup] use an ENUM for the return values of gfc_dep_compare_expr
  2011-09-11 20:43 [Bug fortran/50360] New: [cleanup] use an ENUM for the return values of gfc_dep_compare_expr janus at gcc dot gnu.org
@ 2015-10-13 18:23 ` dominiq at lps dot ens.fr
  0 siblings, 0 replies; 2+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-13 18:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50360

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-10-13
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Any opinion about keeping this four-year old PR opened?


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-13 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-11 20:43 [Bug fortran/50360] New: [cleanup] use an ENUM for the return values of gfc_dep_compare_expr janus at gcc dot gnu.org
2015-10-13 18:23 ` [Bug fortran/50360] " dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).