This is the mail archive of the gcc-prs@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]

c++/971: variable name treated as function pointer



>Number:         971
>Category:       c++
>Synopsis:       variable name treated as function pointer
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 04 00:56:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Ronald Fischer
>Release:        gcc 2.95.2
>Organization:
>Environment:
Solaris 2.6
>Description:
Compilation of the enclosed (presumably legal) program yields 
the error messages

bug1.cc: In function `int f<int>(const char *)':
bug1.cc:13:   instantiated from here
bug1.cc:7: initializing non-const `bool &' with `int (*)(int (*)())' will use a temporary
/pro/prornc/GNU/include/g++/iostream.h:217: in passing argument 1 of `istream::operator >>(bool &)'
bug1.cc:8: return to `int' from `int (*)(int (*)())' lacks a cast
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug1.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug1.cc"

I2luY2x1ZGUgPHN0cnN0cmVhbS5oPgoKdGVtcGxhdGU8dHlwZW5hbWUgSW50ZWdyYWw+CkludGVn
cmFsIGYoY2hhciBjb25zdCogcCkKewogICAgSW50ZWdyYWwgbihJbnRlZ3JhbCgpKTsgLy8gaW5p
dGlhbGl6ZSBJbnRlZ3JhbAogICAgaXN0cnN0cmVhbShwKSA+PiBuOwogICAgcmV0dXJuIG47Cn0K
CnZvaWQgZyhjaGFyKiBwKQp7CiAgICBmPGludD4ocCk7Cn0K

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