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++/12582] New: [3.4 Regression] "declaration of `operator()' as non-function"


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

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

           Summary: [3.4 Regression] "declaration of `operator()' as non-
                    function"
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mckelvey at maskull dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alphaev56-unknown-linux-gnu
  GCC host triplet: alphaev56-unknown-linux-gnu
GCC target triplet: alphaev56-unknown-linux-gnu

Something wrong with namespace lookup? locale defines float_t, I presume in std,
but error is wildly inappropriate. Error goes away if float_t is qualified with
PM::, but not with std::.


/usr/local/bin/g++ -v -c stest.cc


Reading specs from /usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.4/specs
Configured with: ../gcc/configure --verbose --enable-languages=c++
Thread model: posix
gcc version 3.4 20031011 (experimental)
 /usr/local/libexec/gcc/alphaev56-unknown-linux-gnu/3.4/cc1plus -quiet -v
stest.cc -quiet -dumpbase stest.cc -mcpu=ev56 -auxbase stest -version -o
/tmp/ccy1TR9O.s
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory
"/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.4/../../../../alphaev56-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.4/../../../../include/c++/3.4

/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.4/../../../../include/c++/3.4/alphaev56-unknown-linux-gnu

/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.4/../../../../include/c++/3.4/backward
 /usr/local/include
 /usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.4/include
 /usr/include
End of search list.
GNU C++ version 3.4 20031011 (experimental) (alphaev56-unknown-linux-gnu)
	compiled by GNU C version 3.4 20031011 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
stest.cc:17: error: declaration of `operator()' as non-function
stest.cc:17: error: expected function-definition

#include <locale>

namespace PM
{

typedef double float_t;

}

using namespace PM;


class functor_t
{
public:

    int operator()(const float_t& argument1);
};


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