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: pointer <-> integer conversion warnings (bogus -Wall warnings )




       Dautrevaux@microprocess.com

       I was just stressing that "x = (int)p" is NOT equivalent, in
       the standard, to "x = (int)((char *)p - (char *)0)" as you
       suggest,

I did not suggest that those expressions were equivalent in any
standard.


	Then, as you were looking at a portable way to silent this
	warning, I think it is relevant to note that the warning you
	want to silent has NO portable meaning

No, that is not especially relevant.  The question is whether a
single, ordinary cast ought to be sufficient to mark the legal,
non-portable construct as "intentional", and thus not worthy (under
some combination of options) of warning.

-t


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