public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11582] New: Odd error message with dynamically sized template arg printing
@ 2003-07-18 22:25 bangerth at dealii dot org
  2003-07-18 22:52 ` [Bug c++/11582] " gdr at integrable-solutions dot net
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: bangerth at dealii dot org @ 2003-07-18 22:25 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Odd error message with dynamically sized template arg
                    printing
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org,gdr at gcc dot gnu dot
                    org

Extracted from PR 6785: 
 
I guess this is totally irrelevant (because the code is invalid), but nevertheless: for this code 
------------------------------------------------- 
template <typename T> int  size(); 
template <int N>      void f(int (&)[N]); 
 
void g() { 
  int buf[size<int>()]; 
  f( buf ) ; 
} 
------------------------------------------------- 
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. 
 
And then there is the duplicate () after the templates are printed. This can be seen here 
too: 
---------------------------------- 
int  size(); 
template <int N> void f(int (&)[N]); 
 
void g() { 
  int buf[size()]; 
  f( buf ) ; 
} 
------------------------------------- 
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()()])' 
 
I think that looks just cute ;-) 
 
W.


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
  2003-07-18 22:25 [Bug c++/11582] New: Odd error message with dynamically sized template arg printing bangerth at dealii dot org
@ 2003-07-18 22:52 ` gdr at integrable-solutions dot net
  2003-07-19  2:31 ` pinskia at physics dot uc dot edu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-07-18 22:52 UTC (permalink / raw)
  To: gcc-bugs

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


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
  2003-07-18 22:25 [Bug c++/11582] New: Odd error message with dynamically sized template arg printing bangerth at dealii dot org
  2003-07-18 22:52 ` [Bug c++/11582] " gdr at integrable-solutions dot net
@ 2003-07-19  2:31 ` pinskia at physics dot uc dot edu
  2003-07-19  3:00 ` bangerth at dealii dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-19  2:31 UTC (permalink / raw)
  To: gcc-bugs

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-19 02:31:38
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-19 02:31 -------
I thought I saw the double pareneses problem in a different bug before but this error 
message is confusing.


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
  2003-07-18 22:25 [Bug c++/11582] New: Odd error message with dynamically sized template arg printing bangerth at dealii dot org
  2003-07-18 22:52 ` [Bug c++/11582] " gdr at integrable-solutions dot net
  2003-07-19  2:31 ` pinskia at physics dot uc dot edu
@ 2003-07-19  3:00 ` bangerth at dealii dot org
  2003-08-17 12:43 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: bangerth at dealii dot org @ 2003-07-19  3:00 UTC (permalink / raw)
  To: gcc-bugs

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 bangerth at dealii dot org  2003-07-19 03:00 -------
Yeah, I thought of that other PR too when I opened this one. A brief search
finds PR 10345 for the double parentheses problem.

W.


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
  2003-07-18 22:25 [Bug c++/11582] New: Odd error message with dynamically sized template arg printing bangerth at dealii dot org
                   ` (2 preceding siblings ...)
  2003-07-19  3:00 ` bangerth at dealii dot org
@ 2003-08-17 12:43 ` pinskia at gcc dot gnu dot org
  2003-08-23  0:51 ` dhazeghi at yahoo dot com
  2003-11-23  7:04 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-17 12:43 UTC (permalink / raw)
  To: gcc-bugs

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-07-19 02:31:38         |2003-08-17 12:43:09
               date|                            |
            Version|unknown                     |3.4


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-17 12:43 -------
It is even worse now:
First example:
pr11582.cc: In function `void g()':
pr11582.cc:7: error: no matching function for call to `f(int[((long unsigned 
   int)((<anonymous>)size() [with T = int]()))])'

Second example:
pr11582.1.cc: In function `void g()':
pr11582.1.cc:7: error: no matching function for call to `f(int[((long unsigned 
   int)((<anonymous>)size()()))])'


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
  2003-07-18 22:25 [Bug c++/11582] New: Odd error message with dynamically sized template arg printing bangerth at dealii dot org
                   ` (3 preceding siblings ...)
  2003-08-17 12:43 ` pinskia at gcc dot gnu dot org
@ 2003-08-23  0:51 ` dhazeghi at yahoo dot com
  2003-11-23  7:04 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 14+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23  0:51 UTC (permalink / raw)
  To: gcc-bugs

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4                         |---


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
  2003-07-18 22:25 [Bug c++/11582] New: Odd error message with dynamically sized template arg printing bangerth at dealii dot org
                   ` (4 preceding siblings ...)
  2003-08-23  0:51 ` dhazeghi at yahoo dot com
@ 2003-11-23  7:04 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-23  7:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-23 07:04 -------
Looks like this has not been fixed but looks closer to what is needed:
pr11582.cc:7: error: no matching function for call to `f(int[((long unsigned int)((int)size 
[with T = int]()))])'


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-08-17 12:43:09         |2003-11-23 07:04:15
               date|                            |


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


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
       [not found] <bug-11582-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-08-23 21:41 ` pinskia at gcc dot gnu.org
@ 2021-08-23 22:45 ` bangerth at gmail dot com
  6 siblings, 0 replies; 14+ messages in thread
From: bangerth at gmail dot com @ 2021-08-23 22:45 UTC (permalink / raw)
  To: gcc-bugs

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

Wolfgang Bangerth <bangerth at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #13 from Wolfgang Bangerth <bangerth at gmail dot com> ---
Sure, good enough. I think `<anonymous>' isn't quite correct: it's a
variably-sized type, so the size can not be determined at compile time. This is
the part that is missing from the error message. But I don't think it's
worthwhile keeping the report open.

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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
       [not found] <bug-11582-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2013-04-23  3:46 ` gdr at gcc dot gnu.org
@ 2021-08-23 21:41 ` pinskia at gcc dot gnu.org
  2021-08-23 22:45 ` bangerth at gmail dot com
  6 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-23 21:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Since GCC 11 we produce:
<source>: In function 'void g()':
<source>:7:4: error: no matching function for call to 'f(int [<anonymous>])'
    7 |   f( buf ) ;
      |   ~^~~~~~~
<source>:3:28: note: candidate: 'template<int N> void f(int (&)[N])'
    3 | template <int N>      void f(int (&)[N]);
      |                            ^
<source>:3:28: note:   template argument deduction/substitution failed:
<source>:7:4: note:   variable-sized array type 'long int' is not a valid
template argument
    7 |   f( buf ) ;
      |   ~^~~~~~~

GCC 11 removes the (<anonymous> + 1) part and just changes it to be
<anonumous>.

Is this warning good now?

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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
       [not found] <bug-11582-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2013-04-22 10:38 ` manu at gcc dot gnu.org
@ 2013-04-23  3:46 ` gdr at gcc dot gnu.org
  2021-08-23 21:41 ` pinskia at gcc dot gnu.org
  2021-08-23 22:45 ` bangerth at gmail dot com
  6 siblings, 0 replies; 14+ messages in thread
From: gdr at gcc dot gnu.org @ 2013-04-23  3:46 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Gabriel Dos Reis <gdr at gcc dot gnu.org> 2013-04-23 03:45:56 UTC ---
(In reply to comment #9)
> (In reply to comment #8)
> > Printing int[] or int[size_t] would be confusing too. 
> 
> More confusing than int[(((sizetype)<anonymous>) + 1)] ?
> 
> What about?
> 
> t7881.cc: In function ‘void g()’:
> t7881.cc:6:10: error: no matching function for call to ‘f(int
> [{variable-length}])’
> t7881.cc:6:10: note: candidate is:
> t7881.cc:2:23: note: template<int N> void f(int (&)[N])
> t7881.cc:2:23: note:   template argument deduction/substitution failed:
> t7881.cc:6:10: note:   variable-sized array type is not a valid template
> argument

Remember that an "array type" as a function parameter is equivalent to a
pointer type.
>From gcc-bugs-return-420775-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 23 04:07:30 2013
Return-Path: <gcc-bugs-return-420775-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27399 invoked by alias); 23 Apr 2013 04:07:30 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 27369 invoked by uid 48); 23 Apr 2013 04:07:27 -0000
From: "ray_linn at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/57040] New: SEH Exception defined is conflicted with SJLJ Eception within several files.
Date: Tue, 23 Apr 2013 04:07:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ada
X-Bugzilla-Keywords:
X-Bugzilla-Severity: major
X-Bugzilla-Who: ray_linn at hotmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57040-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg01920.txt.bz2
Content-length: 1951


http://gcc.gnu.org/bugzilla/show_bug.cgi?idW040

             Bug #: 57040
           Summary: SEH Exception defined is conflicted with SJLJ Eception
                    within several files.
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ray_linn@hotmail.com


Today I complied the new GCC 4.8.0 for MinGW-W64, I specified to enable SJLJ
Exception in configure commands, and several error occurs in different
libraries.

files impact: ada/raise-gcc.c , libobjc/exception.c.

Error Message is as following:

C:/msys/1.0/home/beta/gcc-4.8.0/libobjc/exception.c:528:1: error: unknown type
n
ame 'EXCEPTION_DISPOSITION'
 EXCEPTION_DISPOSITION
 ^
C:/msys/1.0/home/beta/gcc-4.8.0/libobjc/exception.c:529:30: error: unknown type
name 'PEXCEPTION_RECORD'
 __gnu_objc_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,
                              ^
C:/msys/1.0/home/beta/gcc-4.8.0/libobjc/exception.c:530:9: error: unknown type
n
ame 'PCONTEXT'
         PCONTEXT ms_orig_context,
         ^
C:/msys/1.0/home/beta/gcc-4.8.0/libobjc/exception.c:531:9: error: unknown type
n
ame 'PDISPATCHER_CONTEXT'
         PDISPATCHER_CONTEXT ms_disp)
         ^
C:/msys/1.0/home/beta/gcc-4.8.0/libobjc/exception.c:203:30: warning:
'__gnu_objc
_personality_sj0' defined but not used [-Wunused-function]
 #define PERSONALITY_FUNCTION __gnu_objc_personality_sj0
                              ^
C:/msys/1.0/home/beta/gcc-4.8.0/libobjc/exception.c:234:1: note: in expansion
of
 macro 'PERSONALITY_FUNCTION'
 PERSONALITY_FUNCTION (int version,


Solution is simple, find out all

 #ifdef __SEH__

and repalced it with

#if defined(__SEH__) && !defined(SJLJ_EXCEPTIONS)

please help to patch.


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
       [not found] <bug-11582-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-04-22 10:10 ` gdr at gcc dot gnu.org
@ 2013-04-22 10:38 ` manu at gcc dot gnu.org
  2013-04-23  3:46 ` gdr at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2013-04-22 10:38 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-04-22 10:38:05 UTC ---
(In reply to comment #8)
> Printing int[] or int[size_t] would be confusing too. 

More confusing than int[(((sizetype)<anonymous>) + 1)] ?

What about?

t7881.cc: In function ‘void g()’:
t7881.cc:6:10: error: no matching function for call to ‘f(int
[{variable-length}])’
t7881.cc:6:10: note: candidate is:
t7881.cc:2:23: note: template<int N> void f(int (&)[N])
t7881.cc:2:23: note:   template argument deduction/substitution failed:
t7881.cc:6:10: note:   variable-sized array type is not a valid template
argument
>From gcc-bugs-return-420732-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Apr 22 11:39:10 2013
Return-Path: <gcc-bugs-return-420732-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24797 invoked by alias); 22 Apr 2013 11:39:10 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 24751 invoked by uid 48); 22 Apr 2013 11:39:06 -0000
From: "lee at piclab dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/56648] ignored by target warning not triggered by -fpic but by -fPIC
Date: Mon, 22 Apr 2013 11:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: lee at piclab dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: CC
Message-ID: <bug-56648-4-mre2l33YMZ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56648-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56648-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg01877.txt.bz2
Content-length: 1218


http://gcc.gnu.org/bugzilla/show_bug.cgi?idV648

Lee Daniel Crocker <lee at piclab dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lee at piclab dot com

--- Comment #1 from Lee Daniel Crocker <lee at piclab dot com> 2013-04-22 11:39:05 UTC ---
FWIW, I've been using GCC for decades, and I've never reported a bug, but I
came here with the intent of reporting the existence of this warning as a bug.
I have a beautifully working library that compiles without warnings on Linux.
When I move the same code over to Win32, change the name of the library to
".dll", it also compiles perfectly...except for this warning.

The Unix command philosophy is "shut up and do your job". I tell GCC to give me
position-independent code, and it does so.  But it doesn't shut up.  For some
reason, it wants to tell me "Hey, I was going to do that anyway", which serves
absolutely no purpose other than to complicate my Makefile, which I now have to
change to avoid that warning, hopefully not affecting it for those platforms
that don't issue the warning.


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
       [not found] <bug-11582-4@http.gcc.gnu.org/bugzilla/>
  2012-02-02  0:30 ` pinskia at gcc dot gnu.org
  2013-04-19 17:13 ` manu at gcc dot gnu.org
@ 2013-04-22 10:10 ` gdr at gcc dot gnu.org
  2013-04-22 10:38 ` manu at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: gdr at gcc dot gnu.org @ 2013-04-22 10:10 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Gabriel Dos Reis <gdr at gcc dot gnu.org> 2013-04-22 10:10:36 UTC ---
(In reply to comment #7)
> The '[(((sizetype)<anonymous>) + 1)]' is just awful. If we don't know the
> actual type there, that is "int [size()]", then we should just print 'int []'
> or 'int [size_t]' or something similar to denote a VLA.
> 
> Surprisingly, Clang++ is even more confused:
> 
> test.cc:6:3: error: no matching function for call to 'f'
>   f( buf ) ; 
>   ^
> test.cc:2:28: note: candidate template ignored: could not match 'int' against
> 'int'
> template <int N>      void f(int (&)[N]); 
>                            ^
> test.cc:13:3: error: no matching function for call to 'f'
>   f( buf ) ; 
>   ^
> test.cc:2:28: note: candidate template ignored: could not match 'int' against
> 'int'
> template <int N>      void f(int (&)[N]); 
>                            ^

Printing int[] or int[size_t] would be confusing too. 

Yes, Clang is not the gold standard.


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
       [not found] <bug-11582-4@http.gcc.gnu.org/bugzilla/>
  2012-02-02  0:30 ` pinskia at gcc dot gnu.org
@ 2013-04-19 17:13 ` manu at gcc dot gnu.org
  2013-04-22 10:10 ` gdr at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2013-04-19 17:13 UTC (permalink / raw)
  To: gcc-bugs


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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-04-19 17:13:38 UTC ---
The '[(((sizetype)<anonymous>) + 1)]' is just awful. If we don't know the
actual type there, that is "int [size()]", then we should just print 'int []'
or 'int [size_t]' or something similar to denote a VLA.

Surprisingly, Clang++ is even more confused:

test.cc:6:3: error: no matching function for call to 'f'
  f( buf ) ; 
  ^
test.cc:2:28: note: candidate template ignored: could not match 'int' against
'int'
template <int N>      void f(int (&)[N]); 
                           ^
test.cc:13:3: error: no matching function for call to 'f'
  f( buf ) ; 
  ^
test.cc:2:28: note: candidate template ignored: could not match 'int' against
'int'
template <int N>      void f(int (&)[N]); 
                           ^
>From gcc-bugs-return-420621-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Apr 19 17:46:42 2013
Return-Path: <gcc-bugs-return-420621-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8228 invoked by alias); 19 Apr 2013 17:46:42 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 8196 invoked by uid 48); 19 Apr 2013 17:46:39 -0000
From: "nightstrike at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/56412] [4.8] "libtool: cygpath: command not found" for mingw32 host
Date: Fri, 19 Apr 2013 17:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: nightstrike at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-56412-4-5Caf5nKkAI@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56412-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56412-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg01766.txt.bz2
Content-length: 210


http://gcc.gnu.org/bugzilla/show_bug.cgi?idV412

--- Comment #5 from nightstrike <nightstrike at gmail dot com> 2013-04-19 17:46:37 UTC ---
CYGPATH_W gets set correctly, but libtool seems to ignore it.


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

* [Bug c++/11582] Odd error message with dynamically sized template arg printing
       [not found] <bug-11582-4@http.gcc.gnu.org/bugzilla/>
@ 2012-02-02  0:30 ` pinskia at gcc dot gnu.org
  2013-04-19 17:13 ` manu at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-02  0:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-02 00:30:07 UTC ---
t788.cc: In function ‘void g()’:
t788.cc:6:10: error: no matching function for call to ‘f(int
[(((sizetype)<anonymous>) + 1)])’
t788.cc:6:10: note: candidate is:
t788.cc:2:28: note: template<int N> void f(int (&)[N])
t788.cc:2:28: note:   template argument deduction/substitution failed:
t788.cc:6:10: note:   variable-sized array type ‘int [(((sizetype)<anonymous>)
+ 1)]’ is not a valid template argument

And
t7881.cc: In function ‘void g()’:
t7881.cc:6:10: error: no matching function for call to ‘f(int
[(((sizetype)<anonymous>) + 1)])’
t7881.cc:6:10: note: candidate is:
t7881.cc:2:23: note: template<int N> void f(int (&)[N])
t7881.cc:2:23: note:   template argument deduction/substitution failed:
t7881.cc:6:10: note:   variable-sized array type ‘int [(((sizetype)<anonymous>)
+ 1)]’ is not a valid template argument


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

end of thread, other threads:[~2021-08-23 22:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-18 22:25 [Bug c++/11582] New: Odd error message with dynamically sized template arg printing bangerth at dealii dot org
2003-07-18 22:52 ` [Bug c++/11582] " gdr at integrable-solutions dot net
2003-07-19  2:31 ` pinskia at physics dot uc dot edu
2003-07-19  3:00 ` bangerth at dealii dot org
2003-08-17 12:43 ` pinskia at gcc dot gnu dot org
2003-08-23  0:51 ` dhazeghi at yahoo dot com
2003-11-23  7:04 ` pinskia at gcc dot gnu dot org
     [not found] <bug-11582-4@http.gcc.gnu.org/bugzilla/>
2012-02-02  0:30 ` pinskia at gcc dot gnu.org
2013-04-19 17:13 ` manu at gcc dot gnu.org
2013-04-22 10:10 ` gdr at gcc dot gnu.org
2013-04-22 10:38 ` manu at gcc dot gnu.org
2013-04-23  3:46 ` gdr at gcc dot gnu.org
2021-08-23 21:41 ` pinskia at gcc dot gnu.org
2021-08-23 22:45 ` bangerth at gmail dot com

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).