A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/fmtlib/fmt/issues/2193 below:

GCC pragma and performance question · Issue #2193 · fmtlib/fmt · GitHub

Commit: 243d8be

https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Function-Specific-Option-Pragmas.html:

This pragma allows you to set global optimization options for functions defined later in the source file. One or more strings can be specified. Each function that is defined after this point is treated as if it had been declared with one optimize(string) attribute for each string argument.

https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Common-Function-Attributes.html:

The optimize attribute is used to specify that a function is to be compiled with different optimization options than specified on the command line.

So the attribute or pragma does override the command line?
For example, when using -O3 on the command line, the fmt code will be compiled using only the Og optimization level.

Or did I misunderstand the GCC documentation?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4