This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] Prevent GCC from folding inline test functions


On 08/24/2015 04:59 PM, Luis Machado wrote:
> On 08/24/2015 12:53 PM, Pedro Alves wrote:
>> On 08/24/2015 04:48 PM, Luis Machado wrote:
>>> --- a/gdb/testsuite/gdb.opt/inline-markers.c
>>> +++ b/gdb/testsuite/gdb.opt/inline-markers.c
>>> @@ -13,7 +13,7 @@
>>>      You should have received a copy of the GNU General Public License
>>>      along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>>>
>>> -extern int x, y;
>>> +extern int x, y, z;
>>
>> z here should match the definition (should be volatile here too).
>>
>> Thanks,
>> Pedro Alves
>>
> 
> Fixed with 91dddb86299bba404599551e9e2633b3c0e5c830.
> 

Thanks.  Though,

 -extern int x, y, z;
 +extern int x, y;
 +extern volatile z;

I think this will cause trouble with newer gcc that default
to gnu c11.  Since C99 that a missing type specifier is no
longer implicitly assumed to be int.  Thus that should really be:

extern volatile int z;

Thanks,
Pedro Alves


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