Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-10-07 Thread Bernd Schmidt
On 07/21/2016 08:39 PM, Jeff Law wrote: On 07/15/2016 07:04 AM, Bernd Schmidt wrote: c/ PR c++/69733 * c-decl.c (smallest_type_quals_location): New static function. (grokdeclarator): Try to find the correct location for an ignored qualifier. cp/ PR c++/69733 * decl.c

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-07-21 Thread Jeff Law
On 07/15/2016 07:04 AM, Bernd Schmidt wrote: On 06/22/2016 05:37 AM, Jeff Law wrote: It looks like this stalled... Anyway, it's fine for the trunk. Some of the surrounding code was changed a bit to produce different errors for different C standards, so I had to make an adjustment to the

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-07-15 Thread Bernd Schmidt
On 06/22/2016 05:37 AM, Jeff Law wrote: It looks like this stalled... Anyway, it's fine for the trunk. Some of the surrounding code was changed a bit to produce different errors for different C standards, so I had to make an adjustment to the patch. While I was here, I added cdw_atomic to

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-06-21 Thread Jeff Law
On 05/04/2016 09:17 AM, Bernd Schmidt wrote: On 04/25/2016 10:18 PM, Joseph Myers wrote: On Fri, 22 Apr 2016, Bernd Schmidt wrote: +/* Returns the smallest location != UNKNOWN_LOCATION in LOCATIONS, + considering only those c_declspec_words found in LIST, which + must be terminated by

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-06-02 Thread Bernd Schmidt
On 05/04/2016 05:17 PM, Bernd Schmidt wrote: How's this? Fully retested on x86_64-linux. Ping. Bernd

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-05-04 Thread Bernd Schmidt
On 04/25/2016 10:18 PM, Joseph Myers wrote: On Fri, 22 Apr 2016, Bernd Schmidt wrote: +/* Returns the smallest location != UNKNOWN_LOCATION in LOCATIONS, + considering only those c_declspec_words found in LIST, which + must be terminated by cdw_number_of_elements. */ + +static location_t

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-04-25 Thread Joseph Myers
On Fri, 22 Apr 2016, Bernd Schmidt wrote: > +/* Returns the smallest location != UNKNOWN_LOCATION in LOCATIONS, > + considering only those c_declspec_words found in LIST, which > + must be terminated by cdw_number_of_elements. */ > + > +static location_t > +smallest_type_quals_location

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-04-22 Thread Jason Merrill
The C++ change is OK. Jason

C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-04-22 Thread Bernd Schmidt
The PR is for a C++ form of the form const double val() const { ... } where the warning location is at the second const (by accident, in reality it's just past the function's declarator), while the first const is the one that we are warning about. This patch adds some logic to the C and C++