This is the mail archive of the gcc-patches@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: [PATCH] treat -Wxxx-larger-than=HWI_MAX special (PR 86631)


On Wed, Jul 25, 2018 at 08:54:13AM -0600, Martin Sebor wrote:
> I don't mean for the special value to be used except internally
> for the defaults.  Otherwise, users wanting to override the default
> will choose a value other than it.  I'm happy to document it in
> the .opt file for internal users though.
> 
> -1 has the documented effect of disabling the warnings altogether
> (-1 is SIZE_MAX) so while I agree that -1 looks better it doesn't
> work.  (It would need more significant changes.)

The variable is signed, so -1 is not SIZE_MAX.  Even if -1 disables it, you
could use e.g. -2 or other negative value for the other special case.

	Jakub


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