https://bugs.llvm.org/show_bug.cgi?id=47818

            Bug ID: 47818
           Summary: flang preprocessor fails to parse simple macro alias
           Product: flang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedb...@nondot.org
          Reporter: t...@dev-zero.ch
                CC: david.tr...@arm.com, jper...@nvidia.com,
                    kirankuma...@gmail.com, llvm-bugs@lists.llvm.org,
                    sscalp...@nvidia.com

Given the following code:


#define TO_VERSION2(MAJOR, MINOR) ((MAJOR) * 10000 + (MINOR) * 100)
#define TO_VERSION TO_VERSION2

#if TO_VERSION2(1, 11) <= TO_VERSION2(0, 0)
#endif

#if TO_VERSION(1, 11) <= TO_VERSION(0, 0)
#endif


I get with the latest trunk (llvmorg-12-init-8404-gacd0dd3a62d):

$ flang -E prog.F 
/data/tiziano/flang/install/bin/f18: could not scan prog.F
prog.F:8:15: error: excess characters after expression
  #if TO_VERSION(1, 11) <= TO_VERSION(0, 0)
                ^^^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to