Assuming it is valid and does what is required, maybe the following pragma would be more precise.
#pragma GCC diagnostic warning "-Wwrite-strings"
-- Andy.
Of course, what I should have written was:
Assuming it is valid and does what is required, maybe the following pragma would be more precise.
#pragma GCC diagnostic ignored "-Wcast-qual"
Sorry. I did too much cutting and pasting, and not enough thinking.
-- Andy.
Mike Schaadt wrote:
Hi Mike,
Yes, you are right: I tried it, too, and got the same result. GCC 4.1.2. is the latest version, so I'm not sure why this pragma is being ignored. I was hoping it might be a way of supressing the cast-qual warnings for this file, without suppressing other warnings, too.
-- Andy.