This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.2 PATCH: Fully support parallel gnat1/gnatbind builds

Robert Dewar writes:
> A good example is unreferenced parameters. We require building with
> warnings enabled and also the flag that makes warnings fatal. This means
> that an unreferenced formal parameter is a fatal error. For compatibility
> with old versions of GNAT, we use pragma Warnings (Off), but that's not
> nearly so nice as using pragma Unreferenced (entity-name) which much more
> clearly expresses the requirement, and avoids masking any other warnings.
> We could not use pragma Unreferenced in 3.1, because it was not implemented
> in earlier versions of GNAT, but we should at least consider this cleanup
> for 3.2. We most certainly will do this cleanup internally at ACT for the
> next version of GNAT Pro, since keeping the sources in maximally maintainable
> shape is certainly an internal requirement we have at ACT.

The usual way to handle such things is with configure-time tests: does
the existing Ada compiler support pragma Unreferenced?  If so, use
it, otherwise use pragma Warnings.  That way, developers, who will be
using the latest tools, will get warnings treated as fatals, but users,
who might have skipped one upgrade generation, will still be able to
build the compiler.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]