This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC warnings for unused global variables


On Friday, May 2, 2003, at 07:56 AM, Gabriel Dos Reis wrote:
They can be optimized out if the program cannot tell the difference.

Disagree. I think the above is probably either confusing, or wrong. We can better well what you mean if you tell us if, in:


Given:

extern volatile int i;
int main() {
	i = 1;
	i = 2;
}

can the program tell the difference? If you say no, then I think your statement is wrong, otherwise, if you mean if and only if and not just if above, then I think your statement is confusing.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]