public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/62223] New: error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available
@ 2014-08-22  7:25 tower120 at gmail dot com
  2014-08-22  7:56 ` [Bug c++/62223] " glisse at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: tower120 at gmail dot com @ 2014-08-22  7:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 62223
           Summary: error: there are no arguments to ‘static_asssert’ that
                    depend on a template parameter, so a declaration of
                    ‘static_asssert’ must be available
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tower120 at gmail dot com

May be not a bug... But, why error occurs in the following code?

#include <tuple>
#include <utility>
using namespace std;

template<class ..._Attrs>
class VertexBuffer
{
    static constexpr const bool ownIndices = sizeof...(_Attrs) == 0;

    void test(){
        static_asssert(ownIndices, "Link to owned indices!!");        
    }
}


int main(){}

error: there are no arguments to 'static_asssert' that depend on a template
parameter, so a declaration of 'static_asssert' must be available
[-fpermissive]
         static_asssert(ownIndices, "Link to owned indices!!");
                                                             ^

Doesn't ownIndices template-dependent value?

Compiled with MinGW 4.9
>From gcc-bugs-return-459018-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Aug 22 07:45:37 2014
Return-Path: <gcc-bugs-return-459018-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2349 invoked by alias); 22 Aug 2014 07:45:36 -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 2294 invoked by uid 48); 22 Aug 2014 07:45:29 -0000
From: "amker at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/62220] missed optimization wrt module for loop variable
Date: Fri, 22 Aug 2014 07:45:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: amker at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-62220-4-MZleVznB7H@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-62220-4@http.gcc.gnu.org/bugzilla/>
References: <bug-62220-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-08/txt/msg01515.txt.bz2
Content-length: 482

https://gcc.gnu.org/bugzilla/show_bug.cgi?idb220

amker at gcc dot gnu.org changed:

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

--- Comment #1 from amker at gcc dot gnu.org ---
To do such transformation, first problem needs to be resolved would be scalar
evolution?  I suppose it doesn't handle % (or /) right now?


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

* [Bug c++/62223] error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available
  2014-08-22  7:25 [Bug c++/62223] New: error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available tower120 at gmail dot com
@ 2014-08-22  7:56 ` glisse at gcc dot gnu.org
  2014-08-22  9:54 ` tower120 at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-08-22  7:56 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
I am going to take a guess that you forgot to specify -std=c++11 or equivalent?


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

* [Bug c++/62223] error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available
  2014-08-22  7:25 [Bug c++/62223] New: error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available tower120 at gmail dot com
  2014-08-22  7:56 ` [Bug c++/62223] " glisse at gcc dot gnu.org
@ 2014-08-22  9:54 ` tower120 at gmail dot com
  2014-08-22 10:38 ` glisse at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tower120 at gmail dot com @ 2014-08-22  9:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from tower120 <tower120 at gmail dot com> ---
No, I compile it with -std=c++1y

Here, live example http://ideone.com/KsGrnH (though that is gcc-4.8.1)


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

* [Bug c++/62223] error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available
  2014-08-22  7:25 [Bug c++/62223] New: error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available tower120 at gmail dot com
  2014-08-22  7:56 ` [Bug c++/62223] " glisse at gcc dot gnu.org
  2014-08-22  9:54 ` tower120 at gmail dot com
@ 2014-08-22 10:38 ` glisse at gcc dot gnu.org
  2014-08-22 10:44 ` tower120 at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-08-22 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
Typo, check the exact spelling of what g++ is complaining about.


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

* [Bug c++/62223] error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available
  2014-08-22  7:25 [Bug c++/62223] New: error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available tower120 at gmail dot com
                   ` (2 preceding siblings ...)
  2014-08-22 10:38 ` glisse at gcc dot gnu.org
@ 2014-08-22 10:44 ` tower120 at gmail dot com
  2014-08-22 10:49 ` manu at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tower120 at gmail dot com @ 2014-08-22 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from tower120 <tower120 at gmail dot com> ---
Typo indeed.
I'm so sorry.


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

* [Bug c++/62223] error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available
  2014-08-22  7:25 [Bug c++/62223] New: error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available tower120 at gmail dot com
                   ` (3 preceding siblings ...)
  2014-08-22 10:44 ` tower120 at gmail dot com
@ 2014-08-22 10:49 ` manu at gcc dot gnu.org
  2014-08-22 17:07 ` tower120 at gmail dot com
  2014-08-23 23:01 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2014-08-22 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
The spell-checker would have been helpful here. It would have said: did you
mean 'static_assert'?
>From gcc-bugs-return-459033-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Aug 22 10:49:03 2014
Return-Path: <gcc-bugs-return-459033-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11822 invoked by alias); 22 Aug 2014 10:49:02 -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 11785 invoked by uid 55); 22 Aug 2014 10:48:58 -0000
From: "yroux at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/61876] Converting __builtin_round + cast into __builtin_lround is not always equivalent in regards to math errno
Date: Fri, 22 Aug 2014 10:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: missed-optimization, wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: yroux at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ktkachov at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61876-4-ESngYRohhQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61876-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61876-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-08/txt/msg01530.txt.bz2
Content-length: 784

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida876

--- Comment #12 from yroux at gcc dot gnu.org ---
Author: yroux
Date: Fri Aug 22 10:48:22 2014
New Revision: 214312

URL: https://gcc.gnu.org/viewcvs?rev!4312&root=gcc&view=rev
Log:
2014-08-22 Yvan Roux  <yvan.roux@linaro.org>

    Backport from trunk r212989, r213628.
    2014-08-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    * convert.c (convert_to_integer): Guard transformation to lrint by
    -fno-math-errno.

    2014-07-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    PR middle-end/61876
    * convert.c (convert_to_integer): Do not convert BUILT_IN_ROUND and cast
    when flag_errno_math is on.


Modified:
    branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
    branches/linaro/gcc-4_9-branch/gcc/convert.c


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

* [Bug c++/62223] error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available
  2014-08-22  7:25 [Bug c++/62223] New: error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available tower120 at gmail dot com
                   ` (4 preceding siblings ...)
  2014-08-22 10:49 ` manu at gcc dot gnu.org
@ 2014-08-22 17:07 ` tower120 at gmail dot com
  2014-08-23 23:01 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: tower120 at gmail dot com @ 2014-08-22 17:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from tower120 <tower120 at gmail dot com> ---
Well, classical "static_asssert is not a function/variable/etc" would be enough
for me.

Because "there are no arguments to 'static_asssert' that depend on a template
parameter" means that there IS such a function, but it does not accept current
parameters set (IMHO).


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

* [Bug c++/62223] error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available
  2014-08-22  7:25 [Bug c++/62223] New: error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available tower120 at gmail dot com
                   ` (5 preceding siblings ...)
  2014-08-22 17:07 ` tower120 at gmail dot com
@ 2014-08-23 23:01 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-08-23 23:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to tower120 from comment #6)
> Because "there are no arguments to 'static_asssert' that depend on a
> template parameter" means that there IS such a function, but it does not
> accept current parameters set (IMHO).

No. "A declaration must be available" does not mean "a declaration is available
but it is not usable"


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

end of thread, other threads:[~2014-08-23 23:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-22  7:25 [Bug c++/62223] New: error: there are no arguments to ‘static_asssert’ that depend on a template parameter, so a declaration of ‘static_asssert’ must be available tower120 at gmail dot com
2014-08-22  7:56 ` [Bug c++/62223] " glisse at gcc dot gnu.org
2014-08-22  9:54 ` tower120 at gmail dot com
2014-08-22 10:38 ` glisse at gcc dot gnu.org
2014-08-22 10:44 ` tower120 at gmail dot com
2014-08-22 10:49 ` manu at gcc dot gnu.org
2014-08-22 17:07 ` tower120 at gmail dot com
2014-08-23 23:01 ` redi at gcc dot gnu.org

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