public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* preliminary gcc-3_1-branch fixups
@ 2002-03-03 19:55 Benjamin Kosnik
  2002-03-03 19:59 ` Ben Elliston
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Kosnik @ 2002-03-03 19:55 UTC (permalink / raw)
  To: sid


Found while application testing with gcc-3.1. This is not done, but
has been in my tree for a week or two, so I thought I'd post it.

At some point, typename usage should probably be made consistent. Or,
whatever.

tested x86/linux

2002-03-01  Benjamin Kosnik  <bkoz@redhat.com>

        * include/sidbusutil.h: Make typename usage explicit.


Index: include/sidbusutil.h
===================================================================
RCS file: /cvs/src/src/sid/include/sidbusutil.h,v
retrieving revision 1.11
diff -c -p -r1.11 sidbusutil.h
*** sidbusutil.h	2001/12/04 08:18:15	1.11
--- sidbusutil.h	2002/03/04 03:50:12
***************
*** 1,6 ****
  // sidbusutil.h -*- C++ -*- Different types and sizes of buses.
  
! // Copyright (C) 1999, 2000, 2001 Red Hat.
  // This file is part of SID and is licensed under the GPL.
  // See the file COPYING.SID for conditions for redistribution.
  
--- 1,6 ----
  // sidbusutil.h -*- C++ -*- Different types and sizes of buses.
  
! // Copyright (C) 1999, 2000, 2001, 2002 Red Hat.
  // This file is part of SID and is licensed under the GPL.
  // See the file COPYING.SID for conditions for redistribution.
  
*************** namespace sidutil
*** 811,816 ****
--- 811,818 ----
    class ro_value_control_register: public value_control_register<DataType>
    {
    public:
+     typedef typename value_control_register<DataType>::ValueType ValueType;
+ 
      ro_value_control_register(control_register_bank<DataType>* b,
  			      sid::host_int_4 o,
  			      DataType m,
*************** namespace sidutil
*** 949,962 ****
  				DataType mask,
  				DataType data)
        {
! 	reg_map::iterator i = write_map.find(addr);
  	if (i == write_map.end())
  	  return sid::bus::unmapped; // XXX: or unpermitted?
  	
  	DataType unmatched_mask = mask;
  
  	// scan through all registers at this address
! 	for(reg_vector::iterator it = i->second.begin();
  	    it != i->second.end();
  	    it++)
  	  {
--- 951,964 ----
  				DataType mask,
  				DataType data)
        {
! 	typename reg_map::iterator i = write_map.find(addr);
  	if (i == write_map.end())
  	  return sid::bus::unmapped; // XXX: or unpermitted?
  	
  	DataType unmatched_mask = mask;
  
  	// scan through all registers at this address
! 	for(typename reg_vector::iterator it = i->second.begin();
  	    it != i->second.end();
  	    it++)
  	  {
*************** namespace sidutil
*** 984,990 ****
  			       DataType mask,
  			       DataType& data_out)
        {
! 	reg_map::iterator i = read_map.find(addr);
  	if (i == read_map.end())
  	  return sid::bus::unmapped; // XXX: or unpermitted?
  
--- 986,992 ----
  			       DataType mask,
  			       DataType& data_out)
        {
! 	typename reg_map::iterator i = read_map.find(addr);
  	if (i == read_map.end())
  	  return sid::bus::unmapped; // XXX: or unpermitted?
  
*************** namespace sidutil
*** 992,998 ****
  	DataType unmatched_mask = mask;
  
  	// scan through all registers at this address
! 	for(reg_vector::iterator it = i->second.begin();
  	    it != i->second.end();
  	    it++)
  	  {
--- 994,1000 ----
  	DataType unmatched_mask = mask;
  
  	// scan through all registers at this address
! 	for(typename reg_vector::iterator it = i->second.begin();
  	    it != i->second.end();
  	    it++)
  	  {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: preliminary gcc-3_1-branch fixups
  2002-03-03 19:55 preliminary gcc-3_1-branch fixups Benjamin Kosnik
@ 2002-03-03 19:59 ` Ben Elliston
  2002-03-03 20:08   ` Benjamin Kosnik
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Elliston @ 2002-03-03 19:59 UTC (permalink / raw)
  To: Benjamin Kosnik; +Cc: sid

>>>>> "Benjamin" == Benjamin Kosnik <bkoz@redhat.com> writes:

  Benjamin> At some point, typename usage should probably be made consistent. Or,
  Benjamin> whatever.

Thanks--please commit it if you're able, otherwise let me know and
I'll check it in.

Ben

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: preliminary gcc-3_1-branch fixups
  2002-03-03 19:59 ` Ben Elliston
@ 2002-03-03 20:08   ` Benjamin Kosnik
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Kosnik @ 2002-03-03 20:08 UTC (permalink / raw)
  To: Ben Elliston; +Cc: sid


>   Benjamin> At some point, typename usage should probably be made consistent. Or,
>   Benjamin> whatever.
> 
> Thanks--please commit it if you're able, otherwise let me know and
> I'll check it in.

You'll have to do the check in, I don't have access. It works with either 
compiler, so it might as well go in now.

best,
benjamin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-03-04  4:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-03 19:55 preliminary gcc-3_1-branch fixups Benjamin Kosnik
2002-03-03 19:59 ` Ben Elliston
2002-03-03 20:08   ` Benjamin Kosnik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).