public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14875] New: No or in function names allowed
@ 2004-04-07 11:58 j dot werner at physik dot uni-stuttgart dot de
  2004-04-07 12:25 ` [Bug c++/14875] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: j dot werner at physik dot uni-stuttgart dot de @ 2004-04-07 11:58 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3082 bytes --]

The following code fails to compile using gcc-3.4: 
 
Sample.hpp: 
#ifndef __SAMPLE__ 
#define __SAMPLE__ 
 
using namespace std; 
 
class Sample 
{ 
 
public: 
  Sample::Sample(); 
  void Sample::or(long Digital); 
}; 
 
#endif 
 
Sample.cpp: 
#include "Sample.hpp" 
 
Sample::Sample() 
{ 
} 
 
void Sample::or(long Digital) 
{ 
} 
 
joerg@uhldingen:~$ LANG=C g++-3.4 -v -save-temps Sample.cpp 
Reading specs from /usr/lib/gcc/i486-linux/3.4.0/specs 
Configured with: ../src/configure -v 
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr 
--libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4 
--enable-shared --with-system-zlib --enable-nls --enable-threads=posix 
--without-included-gettext --program-suffix=-3.4 --enable-__cxa_atexit 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm 
--enable-java-awt=gtk --disable-werror i486-linux 
Thread model: posix 
gcc version 3.4.0 20040403 (prerelease) (Debian) 
 /usr/lib/gcc/i486-linux/3.4.0/cc1plus -E -quiet -v -D_GNU_SOURCE Sample.cpp 
-mtune=i486 -o Sample.ii 
ignoring nonexistent directory 
"/usr/lib/gcc/i486-linux/3.4.0/../../../../i486-linux/include" 
#include "..." search starts here: 
#include <...> search starts here: 
 /usr/include/c++/3.4 
 /usr/include/c++/3.4/i486-linux 
 /usr/include/c++/3.4/backward 
 /usr/local/include 
 /usr/lib/gcc/i486-linux/3.4.0/include 
 /usr/include 
End of search list. 
 /usr/lib/gcc/i486-linux/3.4.0/cc1plus -fpreprocessed Sample.ii -quiet 
-dumpbase Sample.cpp -mtune=i486 -auxbase Sample -version -o Sample.s 
GNU C++ version 3.4.0 20040403 (prerelease) (Debian) (i486-linux) 
        compiled by GNU C version 3.4.0 20040403 (prerelease) (Debian). 
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64362 
In file included from Sample.cpp:1: 
Sample.hpp:11: error: expected unqualified-id before '||' token 
Sample.hpp:11: error: abstract declarator `void' used as declaration 
Sample.hpp:11: error: variable or field `type name' declared void 
Sample.hpp:11: error: expected `;' before '||' token 
Sample.cpp:7: error: expected unqualified-id before '||' token 
Sample.cpp:7: error: expected init-declarator before '||' token 
Sample.cpp:7: error: expected `,' or `;' before '||' token 
 
 
Sample.ii: 
# 1 "Sample.cpp" 
# 1 "<built-in>" 
# 1 "<command line>" 
# 1 "Sample.cpp" 
# 1 "Sample.hpp" 1 
 
 
 
using namespace std; 
 
class Sample 
{ 
 
public: 
  Sample::Sample(); 
  void Sample::or(long Digital); 
}; 
# 2 "Sample.cpp" 2 
 
Sample::Sample() 
{ 
} 
 
void Sample::or(long Digital) 
{ 
} 
 
Is or in function names not allowed? 
 
Greetings, 
 
Jörg

-- 
           Summary: No or in function names allowed
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: j dot werner at physik dot uni-stuttgart dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <bug-14875-8295@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2009-04-22 15:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-07 11:58 [Bug c++/14875] New: No or in function names allowed j dot werner at physik dot uni-stuttgart dot de
2004-04-07 12:25 ` [Bug c++/14875] " pinskia at gcc dot gnu dot org
2004-04-07 13:19 ` giovannibajo at libero dot it
2004-04-07 13:23 ` [Bug c++/14875] When using 'or' keyword, the error message speaks of a '||' token giovannibajo at libero dot it
2004-04-07 13:31 ` pinskia at gcc dot gnu dot org
2004-04-08 18:34 ` bangerth at dealii dot org
2004-04-08 18:53   ` Zack Weinberg
2004-04-08 18:53 ` zack at codesourcery dot com
2004-04-08 19:54 ` gdr at integrable-solutions dot net
     [not found] <bug-14875-8295@http.gcc.gnu.org/bugzilla/>
2007-01-28  2:41 ` manu at gcc dot gnu dot org
2007-01-28  4:11 ` gdr at cs dot tamu dot edu
2007-02-01 12:16 ` manu at gcc dot gnu dot org
2007-11-22  8:39 ` spiridenok at tut dot by
2009-02-07 20:29 ` manu at gcc dot gnu dot org
2009-04-22 15:32 ` manu at gcc dot gnu dot org
2009-04-22 15:33 ` manu at gcc dot gnu dot 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).