Other Attributes (The GNU D Compiler)

#### 2.1.3 Other Attributes ¶

The following attributes are defined for compatibility with other compilers.

`@(gcc.attributes.allocSize (sizeArgIdx))` ¶
`@(gcc.attributes.allocSize (sizeArgIdx, numArgIdx))`
`@(gcc.attributes.allocSize (sizeArgIdx))`

  These attributes are a synonym for `@alloc_size(sizeArgIdx, numArgIdx, true)`. Unlike `@alloc_size`, it uses 0-based index of the function arguments.

`@(gcc.attributes.assumeUsed)` ¶

  This attribute is a synonym for `@used`.

`@(gcc.attributes.dynamicCompile)` ¶
`@(gcc.attributes.dynamicCompileConst)`
`@(gcc.attributes.dynamicCompileEmit)`

  These attributes are accepted, but have no effect.

`@(gcc.attributes.fastmath)` ¶

  This attribute is a synonym for `@optimize("Ofast")`. Explicitly sets "fast-math" for a function, enabling aggressive math optimizations.

`@(gcc.attributes.hidden)` ¶

  This attribute is a synonym for `@visibility("hidden")`. Sets the visibility of a function or global variable to "hidden".

`@(gcc.attributes.naked)` ¶

  This attribute is a synonym for `@attribute("naked")`. Adds GCC’s "naked" attribute to a function, disabling function prologue / epilogue emission. Intended to be used in combination with basic `asm` statements. While using extended `asm` or a mixture of basic `asm` and D code may appear to work, they cannot be depended upon to work reliably and are not supported.

`@(gcc.attributes.noSanitize ("sanitize_option"))` ¶

  This attribute is a synonym for `@no_sanitize("sanitize_option")`.

`@(gcc.attributes.optStrategy ("strategy"))` ¶

  This attribute is a synonym for `@optimize("O0")` and `@optimize("Os")`. Sets the optimization strategy for a function. Valid strategies are "none", "optsize", "minsize". The strategies are mutually exclusive.

`@(gcc.attributes.polly)`

  This attribute is a synonym for `@optimize("loop-parallelize-all", "loop-nest-optimize")`. Only effective when GDC was built with ISL included.