C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Revising #pragma once

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 27 Aug 2024 19:25:01 -0700
On Tuesday 27 August 2024 16:54:06 GMT-7 Arthur O'Dwyer via Std-Proposals
wrote:
> It might be *actually, practically* useful, if someone with access to an
> environment like Gašper's, and GCC-hacking experience, would combine these
> to produce a compiler switch — something like `gcc
> -fpragma-once-hash-based`, or `-fpragma-once-timestamp-based`, or
> `-fpragma-once-something-else`

Just in case someone is thinking of implementing this: command-line switches
won't cut it. Gašper said that one of the problems is third-party content,
which very likely means third-party buildsystems too. Passing command-line
options through poorly-written buildsystems (or poor use of good ones) is
unreliable.

For Clear Linux, we patch GCC to accept some options through the environment,
so we can be sure to get them through, like -Wno-error.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2024-08-28 02:25:06