public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/53934] New: Better CPP macro diagnostics
@ 2012-07-12  7:48 burnus at gcc dot gnu.org
  2012-10-09  9:15 ` [Bug fortran/53934] " manu at gcc dot gnu.org
  2014-04-16 20:26 ` manu at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-12  7:48 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53934
           Summary: Better CPP macro diagnostics
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
        Depends on: 44054, 53552


GCC has (now) for the following C program the nice warning:


foo.c:1:23: error: invalid operands to binary << (have ‘int’ and ‘double’)
 #define MOVE(a,b)  (a << (b))
                       ^
foo.c:4:7: note: in expansion of macro 'MOVE'
   i = MOVE(12,2.2);
       ^
/* ------------------ */
#define MOVE(a,b)  (a << (b))
foo(){
  int i;
  i = MOVE(12,2.2);
}



While for Fortran one just gets:

foo.F90:2.14:

i = lshift(1, 1.1)
              1
Error: 'shift' argument of 'lshift' intrinsic at (1) must be INTEGER

which is less helpful.


#define MOVE(a,b) lshift(a,b)
integer :: i
i = MOVE(1, 1.1)
end


Expected: Something similar. Possibly related to PR44054 and PR53552


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

end of thread, other threads:[~2014-04-16 20:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12  7:48 [Bug fortran/53934] New: Better CPP macro diagnostics burnus at gcc dot gnu.org
2012-10-09  9:15 ` [Bug fortran/53934] " manu at gcc dot gnu.org
2014-04-16 20:26 ` manu at gcc dot gnu.org

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).