[erlang-patches] Print column numbers when compiling

Anthony Ramine <>
Sun Jun 3 11:05:44 CEST 2012

This patch makes erlc print column numbers when compiling .erl files through a
new compile option, "column":

	$ cat foo.erl 
	foo(X) -> bar.
	$ bin/erlc foo.erl
	foo.erl:2: Warning: function foo/1 is unused
	foo.erl:2: Warning: variable 'X' is unused
	$ bin/erlc +column foo.erl
	foo.erl:2:1: Warning: function foo/1 is unused
	foo.erl:2:5: Warning: variable 'X' is unused

The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189:

  Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into maint (2012-05-23 16:15:58 +0200)

are available in the git repository at:

  https://github.com/nox/otp.git compile-column-numbers

for you to fetch changes up to 5af6bd403862b10693035bebfd88d326541ca4bb:

  Fix printing of errors with column numbers (2012-06-03 10:45:51 +0200)

Anthony Ramine (4):
      Export type erl_scan:location/0
      Allow setting of initial position in epp
      Create a new "column" option in compile
      Fix printing of errors with column numbers

 lib/compiler/doc/src/compile.xml |    5 +++++
 lib/compiler/src/compile.erl     |   11 ++++++++--
 lib/stdlib/doc/src/epp.xml       |    2 ++
 lib/stdlib/src/epp.erl           |   44 ++++++++++++++++++++++++++++++--------
 lib/stdlib/src/erl_scan.erl      |    2 +-
 5 files changed, 52 insertions(+), 12 deletions(-)


Anthony Ramine

More information about the erlang-patches mailing list