> Most of the tweaks involve turning selected warnings off.
FYI this is in.
#pragma GCC diagnostic (warning|error|ignored) "-Wwhatever"
No push/pop yet, it's currently file-scope. See the threads with
"warning control" in the subject.
On Jan 9, 2006, at 10:46 AM, David Taylor wrote:
For a variety of reasons, we would like to be able to specify
individual compilation switches *within* individual files.
Dale added this to our gcc compiler, see the apple/trunk branch for
example, near APPLE LOCAL .* optimization pragmas lines
DJ Delorie wrote:
Seems rather marginal to worry about this. Surely this is letting
best be the enemy of good.
I agree. I was only noting the objections last time I suggested
something like this.
And as for it being a bug, that's just a matter of clear
documentation.
The prob
> Seems rather marginal to worry about this. Surely this is letting
> best be the enemy of good.
I agree. I was only noting the objections last time I suggested
something like this.
> And as for it being a bug, that's just a matter of clear
> documentation.
The problem was that you *can't* hav
DJ Delorie wrote:
For example, if you have two warnings in one statement, you can't
control one but not the other if they use the same -W option. A minor
point, but if we used line numbers we'd be really close to "this
should work" that people would claim it's a bug when it doesn't.
Seems r
> >and, for diagnostics with line number information, doing the lookup
> >to see what was in effect at that line. But the complications are
> >worse than the benefits.
>
> Can you explain the complications you see. This seems like the way
> to go to me, because it guarantees that the effect is pr
DJ Delorie wrote:
I had thought of keeping a table of pragma-settings-by-line-number
and, for diagnostics with line number information, doing the lookup to
see what was in effect at that line. But the complications are worse
than the benefits.
Can you explain the complications you see. Thi
> Longer term, I'd like to be able to control warnings on a line by
> line basis. The ability to say "I've examined this expression /
> line / block / whatever of code and I'm happy with it with-regard-to
> warning XYZ, please be quiet" would be very valuable.
>
> Based on Gaby's comments, it so
> Date: Mon, 9 Jan 2006 14:30:03 -0500
> From: DJ Delorie <[EMAIL PROTECTED]>
> > . Next, if it would not be rejected on the "we don't want to have such
> > functionality" basis, then the question becomes one of what should the
> > interface look like? Some possibilities include:
> >
> > #pr
> GCC's current architecture, heavily relying on global states, is not
> yet prepared to consistently support such feature -- even though the
> sole diagnostic machinery might be somewhat prepared for that.
Yes, we've covered this a couple of times before. There's a limited
set of things we can
> Date: Mon, 9 Jan 2006 11:13:22 -0800
> From: Joe Buck <[EMAIL PROTECTED]>
>
> On Mon, Jan 09, 2006 at 01:46:21PM -0500, David Taylor wrote:
> > For a variety of reasons, we would like to be able to specify
> > individual compilation switches *within* individual files.
>
> You don't need a gcc m
Robert Dewar <[EMAIL PROTECTED]> writes:
| DJ Delorie wrote:
|
| >I had planned on forcing the user to place these pragmas before the
| >first function definition, otherwise it becomes difficult to track
| >when various warnings are in force.
| >
| For warnings, it is definitely useful to be able
DJ Delorie <[EMAIL PROTECTED]> writes:
| > . Next, if it would not be rejected on the "we don't want to have such
| > functionality" basis, then the question becomes one of what should the
| > interface look like? Some possibilities include:
| >
| > #pragma GCC command-line -Wprecision-misma
DJ Delorie wrote:
I had planned on forcing the user to place these pragmas before the
first function definition, otherwise it becomes difficult to track
when various warnings are in force.
For warnings, it is definitely useful to be able to use them on a fine
grained basis in the
source. One
> . Next, if it would not be rejected on the "we don't want to have such
> functionality" basis, then the question becomes one of what should the
> interface look like? Some possibilities include:
>
> #pragma GCC command-line -Wprecision-mismatch
>
> unilaterally set -Wprecision-mismatch
On Mon, Jan 09, 2006 at 01:46:21PM -0500, David Taylor wrote:
> For a variety of reasons, we would like to be able to specify
> individual compilation switches *within* individual files.
You don't need a gcc modification to do that; you can arrange to get
the compiler flags from a comment in the f
David Taylor wrote:
. For starters, does this sound reasonable? That is, if I implemented
this, and we contributed it back, would it be considered? Or would it
likely be rejected out of hand?
To me, it seems better to handle this in the external environment with
appropriate
build tools. Fo
For a variety of reasons, we would like to be able to specify
individual compilation switches *within* individual files.
When building we specify a large number of compilation options. But,
some files need tweaks of one sort or another to the generic set of
options.
Most of the tweaks involve tu
18 matches
Mail list logo