[llvm-bugs] [Bug 47818] New: flang preprocessor fails to parse simple macro alias

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 13 05:55:53 PDT 2020


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: unassignedbugs at nondot.org
          Reporter: tm at dev-zero.ch
                CC: David.Truby at arm.com, jperier at nvidia.com,
                    kirankumartp at gmail.com, llvm-bugs at lists.llvm.org,
                    sscalpone at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201013/ac4d4b62/attachment.html>


More information about the llvm-bugs mailing list