This is the mail archive of the gcc@gcc.gnu.org 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]

Re: Target-specific pragmas


On Wed, 20 Jun 2001, Stan Shebs wrote:
  2. Some of our pragmas exist to provide per-function control over
  optimization levels and flag_writable_strings.  I vaguely remember
  some discussion over whether there ought to be some kind of fine
  grained control over flags via pragmas and/or attributes.  Is there
  a consensus on what to do here?

The capability of setting per-function optimization levels would also be
very useful for GNAT, as the Ada language defines a similar pragma:

ARM 2.8(27)
  A pragma Optimize takes one of the identifiers Time, Space, or Off as
  the single argument. This pragma is allowed anywhere a pragma is
  allowed, and it applies until the end of the immediately enclosing
  declarative region, or for a pragma at the place of a compilation_unit,
  to the end of the compilation. It gives advice to the implementation as
  to whether time or space is the primary optimization criterion, or that
  optional optimizations should be turned off. It is implementation
  defined how this advice is followed.

In GNAT currently this advice is not followed, but it should.
I'd think there should be a general mechanism in GCC to specify
compilation options on at least a per-function level. Does anybody
have any ideas on how this could be implemented in a clean way?

  -Geert


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