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++/60068] New: missing diagnostic on array with negative bounds in template


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

            Bug ID: 60068
           Summary: missing diagnostic on array with negative bounds in
                    template
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gmail dot com

GCC 4.8.2 and all versions prior to it fail to diagnose the following
ill-formed C++ '98 program:

$ cat u.cpp && g++ -Wall -Wextra -Werror -pedantic -c -o/dev/null u.cpp && echo
success
template <int N>
void f (int [N]) { }

void g (void) {
    f<-1>(0);
}

success


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