Question/proposal for USE_MAPPED_LOCATION and Ada

Robert Dewar dewar@gnat.com
Wed Oct 6 23:30:00 GMT 2004


Steven Bosscher wrote:
> On Thursday 07 October 2004 01:03, Robert Dewar wrote:
> 
>>I would think so, but I am not aware of the capability in C++
>>of having an error message refer to the template location and
>>to chain of locations where the template is instantiated.
>>Perhaps I just don't know :-)
> 
> 
> C++ gives you something like this:
> 
> /usr/include/g++-2/stl_deque.h:747: warning: comparison between signed and unsigned
> /usr/include/g++-2/stl_deque.h: In method `void deque<int,__default_alloc_template<true,0>,0>::reserve_map_at_front<int, alloc, 0>(unsigned int = 1)':
> /usr/include/g++-2/stl_deque.h:1219:   instantiated from `deque<int,__default_alloc_template<true,0>,0>::new_elements_at_front<int, alloc, 0>(unsigned int)'
> /usr/include/g++-2/stl_deque.h:609:   instantiated from `deque<int,__default_alloc_template<true,0>,0>::reserve_elements_at_front<int, alloc, 0>(unsigned int)'
> /usr/include/g++-2/stl_deque.h:947:   instantiated from `deque<int,__default_alloc_template<true,0>,0>::insert<__deque_iterator<int,const int &,const int &,0>>(__deque_iterator<int,int &,int *,0>, __deque_iterator<int,const int &,const int &,0>, __deque_iterator<int,const int &,const int &,0>, forward_iterator_tag)'
> /usr/include/g++-2/stl_deque.h:508:   instantiated from `deque<int,__default_alloc_template<true,0>,0>::insert<__deque_iterator<int,const int &,const int &,0>>(__deque_iterator<int,int &,int *,0>, __deque_iterator<int,const int &,const int &,0>, __deque_iterator<int,const int &,const int &,0>)'
> /usr/include/g++-2/stl_deque.h:424:   instantiated from `deque<int,__default_alloc_template<true,0>,0>::operator =<int, alloc, 0>(const deque<int,__default_alloc_template<true,0>,0> &)'
> t.cc:3:   instantiated from here
> /usr/include/g++-2/stl_deque.h:638: warning: comparison between signed and unsigned
> 
> Is that what you mean with "chain of locations"?

Yes, indeed, sorry, I was not aware of this, last time I tried, I did not get this.

SO, that means that it should be possible to map the Ada into the same kind of
structure. Is there no provision for column numbers? That seems a pity.
> 
> Gr.
> Steven



More information about the Gcc mailing list