Character index vs Column number in GHC error messages

Krasimir Angelov kr.angelov at gmail.com
Mon Sep 12 17:38:36 EDT 2005


2005/9/12, Simon Marlow <simonmar at microsoft.com>:
> GNU CPP reports the column number, not the char index, AFAICT.  Try the
> attached file.

CPP returns the following error for the attached file:

ctest22.c:3:13: macro "undefined" requires 2 arguments, but only 1 given
 undefined;

13 is exactly the index of the closing paren. In the same time, with
tab size 4, the 13-nth column is at the character 'd' from
"undefined".

I am using CPP version 3.4.4

$ cpp --version
cpp (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Cheers,
  Krasimir


More information about the Glasgow-haskell-users mailing list