Hi Alexander, > -----Original Message----- > From: Alexander Monakov <amona...@ispras.ru> > Sent: Tuesday, October 2, 2018 08:01 > To: Tamar Christina <tamar.christ...@arm.com> > Cc: Jeff Law <l...@redhat.com>; gcc-patches@gcc.gnu.org; nd > <n...@arm.com>; jos...@codesourcery.com > Subject: RE: [PATCH][GCC][front-end][opt-framework] Update options > framework for parameters to properly handle and validate configure time > params. [Patch (2/3)] > > Hello, > > On Tue, 24 Jul 2018, tamar.christ...@arm.com wrote: > > > > * params.c (validate_param): New. > > (add_params): Use it. > > (set_param_value): Refactor param validation into validate_param. > > (diagnostic.h): Include. > > * diagnostic.h (diagnostic_ready_p): New. > > this patch was committed to trunk recently, and an automated email from > Coverity static checker has pointed out a useless self-assignment in a new > loop. It seems wrong indeed. >
It's not wrong it's just unneeded. I'll write a patch to remove the assignment. Thanks, Tamar > @@ -68,12 +73,26 @@ add_params (const param_info params[], size_t n) [...] > + > + /* Now perform some validation and set the value if it validates. */ > + for (size_t i = 0; i < n; i++) > + { > + if (validate_param (dst_params[i].default_value, dst_params[i], > (int)i)) > + dst_params[i].default_value = dst_params[i].default_value; > + } > } > > > Alexander