malcolmwallace / cpphs

The C pre-processor, implemented in Haskell.
2 stars 0 forks source link

cpphs 1.20.8 chokes on sys/cdefs.h #19

Open KaneTW opened 5 years ago

KaneTW commented 5 years ago

When trying to parse "sys/cdefs.h", the following error occurs:


cpphs: Cannot parse #if directive in file /usr/include/x86_64-linux-gnu/sys/cdefs.h  at line 415 col 1:
    expected ) got ?
CallStack (from HasCallStack):
  error, called at ./Language/Preprocessor/Cpphs/CppIfdef.hs:192:28 in main:Language.Preprocessor.Cpphs.CppIfdef

Relevant statement:

#if (!defined _Noreturn \
     && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
     &&  !__GNUC_PREREQ (4,7))
# if __GNUC_PREREQ (2,8)
#  define _Noreturn __attribute__ ((__noreturn__))
# else
#  define _Noreturn
# endif
#endif