GNU bug report logs -
#10572
ada-mode indentation for extended return is off by 1
Previous Next
Reported by: Simon Wright <simon <at> pushface.org>
Date: Sat, 21 Jan 2012 06:44:01 UTC
Severity: normal
Tags: wontfix
Fixed in version 6.0.1
Done: Stephen Leake <stephen_leake <at> stephe-leake.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Package: emacs, ada-mode
Version: 23.3.1
ada-mode version 4.01
NB, when I say 'off by 1' I mean that the compiler complains about the indentation selected.
In the code attached, ada-mode indents the 'for' statement by 2 spaces. The compiler (GCC 4.6.0 and GNAT GPL 2011) with standard style checks (-gnaty) complains:
$ gnatmake -c -u -f extended_return_indentation.adb -gnaty
gcc -c -gnaty extended_return_indentation.adb
extended_return_indentation.adb:1:01: (style) subprogram body has no previous spec
extended_return_indentation.adb:5:06: (style) bad indentation
extended_return_indentation.adb:6:09: (style) bad indentation
extended_return_indentation.adb:7:12: (style) bad indentation
extended_return_indentation.adb:8:09: (style) bad indentation
extended_return_indentation.adb:9:06: (style) bad indentation
If the 'for' statement is indented by 3 spaces, the compilers don't issue the indentation warnings.
[extended_return_indentation.adb (application/octet-stream, attachment)]
This bug report was last modified 6 years and 156 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.