This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/11582] Odd error message with dynamically sized template arg printing


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11582



------- Additional Comments From gdr at integrable-solutions dot net  2003-07-18 22:52 -------
Subject: Re:  New: Odd error message with dynamically sized template arg printing

"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| ------------------------------------------------- 
| we get the following error: 
| tmp/gg> ../build-gcc/gcc-install/bin/c++ -c x.cc 
| x.cc: In function `void g()': 
| x.cc:6: error: no matching function for call to `f(int[size() [with T = int]()])' 
|  
| Note how we try to write the size of the array as an expression, which involves the 
| call to a templated function, and where it tries to place the template arg when 
| printing it. It is a little confusing to see the [with T=int] here, since T is nowhere referenced 
| before or after, and the placing is odd. 

I agree with you, that looks ugly.  
Fortunately, with the new pretty-printer being written, we should be
able to do better.  But before that, I need to get rid of some odd
diagnostic functions, which is what I'm currently doing.

[...]

| x.cc:6: error: no matching function for call to `f(int[size()()])' 
|  
| I think that looks just cute ;-) 

Again agreed.

We've been pulling out too important info, and trying hard to pull in
too irrelevant info.

-- Gaby


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