Re: Quick question about Ada code formatting.



Georg Bauhaus <bauhaus@xxxxxxxxxxxxx> writes:

-gnaty could be improved, in my view, by separating layout
issues from issues that potentially affect how a piece of
code can be organized, and compiled.

For example, on the one hand -gnaty marks
test.ada:2:04: (style) subprogram body has no previous spec

and on the other hand,
test.ada:3:09: (style) space required

These messages point to different issues, the first says something
about a program's organization. It refers to the fundamental
issue of separating spec and implementation. The second is largely
a typographic issue. It has no relevance for program organization.

These are separate warnings; one is -gnatys, the other -gnatyt.

I guess you would rather have -gnatzs, and -gnatyt? I don't see the
point.

The fact that the GNAT compiler groups them under -gnaty isn't
particularly relevant, unless you happen to like the defaults.

I always assume the defaults for any particular compiler switch are
probably not what I want.

--
-- Stephe
.



Relevant Pages

  • Re: (something) /= something ?
    ... It's not at all obvious that there's any relevance. ... my mental model of the problem that led me to try it ... >>compiler could possibly be doing there). ... >>led FJRA to try it? ...
    (comp.lang.fortran)
  • Re: CX-Post: hello world
    ... > and be more careful in the future. ... it has more relevance than you might think. ... have compiled and linked his code with a C compiler, ... message looks like the typical message you get if you try to link C++ ...
    (comp.lang.cpp)
  • Re: (something) /= something ?
    ... It's not at all obvious that there's any relevance. ... my mental model of the problem that led me to try it ... > compiler could possibly be doing there). ... > led FJRA to try it? ...
    (comp.lang.fortran)