public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13637] New: "or" "xor" "and" identifiers like || ^ && macroses
@ 2004-01-10  0:24 linux4sin at mail dot ru
  2004-01-10  0:26 ` [Bug c++/13637] " falk at debian dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: linux4sin at mail dot ru @ 2004-01-10  0:24 UTC (permalink / raw)
  To: gcc-bugs

class Reg{
public:
        Reg(){};
        Reg( const Reg& r ) {};
        Reg& xor( const Reg &r ){return *this;};
};
int main(){
        int and;
        Reg r;
        int a = 1 and 4;
        return 0;
}
Reg& or(Reg& r){return r;};

[sin@localhost fire]$ g++ -o si si.cc
si.cc:5: syntax error before `^' token
si.cc:6: syntax error before `}' token
si.cc: In function `int main()':
si.cc:8: syntax error before `&&' token
si.cc: At global scope:
si.cc:13: syntax error before `||' token

Reading specs from /usr/lib/gcc-lib/i586-alt-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking --enable-long-long
--enable-__cxa_atexit --enable-languages=c,c++,f77,objc,java
--program-suffix=-3.2 --enable-objc-gc --with-system-zlib
--without-included-gettext --host=i586-alt-linux --build=i586-alt-linux
--target=i586-alt-linux
Thread model: posix
gcc version 3.2.3 (ALT Linux, build 3.2.3-alt2)

Linux 2.4.22-std-up-alt12 i686 GNU/Linux

So, I can reload operators, but can't functions
Is it normal?

-- 
           Summary: "or" "xor" "and" identifiers like || ^ && macroses
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: linux4sin at mail dot ru
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/13637] "or" "xor" "and" identifiers like || ^ && macroses
  2004-01-10  0:24 [Bug c++/13637] New: "or" "xor" "and" identifiers like || ^ && macroses linux4sin at mail dot ru
@ 2004-01-10  0:26 ` falk at debian dot org
  2004-01-10  2:40 ` linux4sin at mail dot ru
  2004-01-10 16:05 ` gdr at integrable-solutions dot net
  2 siblings, 0 replies; 4+ messages in thread
From: falk at debian dot org @ 2004-01-10  0:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From falk at debian dot org  2004-01-10 00:26 -------
"xor" and "and" are reserved words, you cannot use them for identifiers.


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


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


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

* [Bug c++/13637] "or" "xor" "and" identifiers like || ^ && macroses
  2004-01-10  0:24 [Bug c++/13637] New: "or" "xor" "and" identifiers like || ^ && macroses linux4sin at mail dot ru
  2004-01-10  0:26 ` [Bug c++/13637] " falk at debian dot org
@ 2004-01-10  2:40 ` linux4sin at mail dot ru
  2004-01-10 16:05 ` gdr at integrable-solutions dot net
  2 siblings, 0 replies; 4+ messages in thread
From: linux4sin at mail dot ru @ 2004-01-10  2:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From linux4sin at mail dot ru  2004-01-10 02:40 -------
Is it by standart? 
I don't know about this macroses. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED


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


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

* [Bug c++/13637] "or" "xor" "and" identifiers like || ^ && macroses
  2004-01-10  0:24 [Bug c++/13637] New: "or" "xor" "and" identifiers like || ^ && macroses linux4sin at mail dot ru
  2004-01-10  0:26 ` [Bug c++/13637] " falk at debian dot org
  2004-01-10  2:40 ` linux4sin at mail dot ru
@ 2004-01-10 16:05 ` gdr at integrable-solutions dot net
  2 siblings, 0 replies; 4+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-10 16:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-01-10 16:05 -------
Subject: Re:  "or" "xor" "and" identifiers like || ^ && macroses

"linux4sin at mail dot ru" <gcc-bugzilla@gcc.gnu.org> writes:

| Is it by standart? 

yes.

| I don't know about this macroses. 

they aren't macros.

-- Gaby


-- 


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


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

end of thread, other threads:[~2004-01-10 16:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-10  0:24 [Bug c++/13637] New: "or" "xor" "and" identifiers like || ^ && macroses linux4sin at mail dot ru
2004-01-10  0:26 ` [Bug c++/13637] " falk at debian dot org
2004-01-10  2:40 ` linux4sin at mail dot ru
2004-01-10 16:05 ` gdr at integrable-solutions dot net

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