Skip to content

ghc-tags seems to choke on CPP ! negation #6

@juhp

Description

@juhp

I often use CPP like:

#if !MIN_VERSION_simple_cmd_args(0,1,4)
: 

in my code which seems to trip up ghc-tags (I am using 1.5).

I get an error like:

ghc-tags -e

Common.hs:6:0: error:
     error: missing binary operator before token "("
        6 | #if !MIN_VERSION_http_directory(0,1,6)
          | 
  |
6 | #if !MIN_VERSION_http_directory(0,1,6)
  | ^

Common.hs:12:0: error:
 
    error: missing bQiunearry
y. hosp:eMr2aa4it:no.r0h :sb :eerror:f8o
:re 0  :t  o error:ke 
ne r
 "r (o "r 
:U  R meL ir. srh sosir: n: g 9  m:1bi2is0 ns:|ai  rnerror:#ygi  
fob pi !en Mra Iar Nty_o  VroeE prRberSeroIfarOot:Nro _ermh  ittbstoespkfi_eondnrgi e r" be(tic"ont
kaoerr nyy   ( "o0 (p,"e1 
r, a6  t)2 o
4 r    |b   e # f i of r  8e !   M|t I o N#k _ie|Vfn E  
R!"SM(II" ON
 N_ _V |sE 
iR mS 1pI2lO  eN |__ cs  mi9dm #(p|0l i,e#f2_i ,cf!0m M)dMI
_INaN_ r_V gVE sER (RS0SI ,IO 1ON ,N_ 4_h )ht 
tt|tp  p_
 _d di ir re  ec  ct| to
 or ry2 y(4|(0  0,|
,11, ,6 9)# )
|
i
 f   8  !  |M| I N  ^_ 
V# E Ri Sf I |
O! NM
_IsNi_ mVC pEo|lRm
eSm_Io9cOn mN.|d_h(ss 0i:,m#2p1,l6i0e:f)_ 
c0Mm:I d N _error:_ aV|r
EgR s S^( I
0 O, N1_, h4et)rt
rQuery.hs:1:1: error:
    `gcc' failed in phase `C pre-processor'. (Exit code: 1)
po_ rd :i| rme ic^st
soirnyg( 0
b,i1n,aM9ra)yi
 no. ph es|r:a t1^o6
r: b0e:f 
oerror:re
 UtR oL k. eh ns : "e(3r"3r
:or 0: :   m error:is 
s i  n1 g6    b|i  n#eairrfry o MroI:pN e_mrViaEstRsoSirIn OgbN e_bfsioinrmaepr lyte o_okcpemendr (a"0t(,o"2r
, 0b )e 
f o  r e     t o1 k6 e  n|    "# (i|"f 
 
! M I  N  _ V| E
 R S13I63O  N||_ s #iim#fp li!efM_ IcMNmI_dNV__EaVRrESgRIsSO(IN0O_,Nh1_t,st7ip)m_
pdli er _e cc mtdo (r 0y ,( 20 ,, 01|), 
9
) 
     |   |  
^
 1 6   | 
  | #
if   ! M|I
N_3V3E R|SIC OoNm#_msoiinfm. ph!lsMe:I_Nc2_m5Vd:E_Ra0Sr:Ig Oserror:N(_0h
,t1t ,p 7_ )d 
ir  ee cr tr|oorr y:^( 
0m,i1s,s9i
)n
g M ba ii nn|a.rh ys^ :
op2e4r:aURL.hs:1:1: error:
    `gcc' failed in phase `C pre-processor'. (Exit code: 1)
t0o:r  error:be
fo r e   to keernr o"r(:" 
mi s s i ng   b i2n5a r|y  #oipfe r!aMtIoNr_ VbEeRfSoIrOeN _thotktepn_ d"i(r"e
ct o r y (0 , 1 ,264) 
|  # i f  ! M I N _ V E|R S
ION _ s i|m
pl2e5_ c|md _a#rgisf( 0!,M1I,N7_)V
ER S I O N_ h t t p _ d|i r
ect o r y|(
0,214, 6|)
  #  i|f  !^M
IN_VERSION_simple_cCommon.hs:1:1: error:
md    `gcc' failed in phase `C pre-processor'. (Exit code: 1)
_args(0,1,7)
   | ^
Main.hs:1:1: error:
    `gcc' failed in phase `C pre-processor'. (Exit code: 1)

which is quite "interesting". :)

If you want to reproduce this is with https://github.com/juhp/fedora-repoquery but I don't think that particularly matters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions