[mythtv] problem with tonights cvs?

Matt Zimmerman mdz at debian.org
Sun Jun 29 15:05:46 EDT 2003


On Sun, Jun 29, 2003 at 12:21:34PM -0500, Chad McQuinn wrote:

> On 6/29/03 11:17 AM, "Craig Longman" <craigl at begeek.com> wrote:
> 
> >> Because you are using a modern C++ compiler? Without -fno-operator-names any
> >> "new" g++ will compile code with 'and', 'or', 'bitand' etc, they are C++
> >> operators.
> >> 
> > hmm, they're actually part of c++ now?  thats gonna look a little weird
> > until i get used to it.
> 
> These have been around for a long while now.
> 
> > well, if its standard, then encourage away i would say.  but if my
> > compiler (from debian stable) doesn't deal with it, then i would suggest
> > that it is a little too recent to standardize on.  i'm sure the last
> > thing this project needs is another compiler quirk to deal with on the
> > lists.
> 
> In my (possibly faulty) memory, these predate debian's existence, let alone
> the current debian stable. I just checked with the oldest c++ compiler I
> have access to (gcc 2.95.2); it handles 'and' in place of '&&' just fine.
> What it probably wouldn't like is 'and' in a .c (not .cpp) file. Is that
> maybe what happened here? I lost track of where the original error occurred.

What version of gcc 2.95.2 exactly?  Debian woody shipped with 2.95.4 and
3.0.4, using 2.95.4 by default.  3.0.4 accepts it, while 2.95.4 does not.

dijkstra:[~] cat and.c
#include <stdio.h>

int main() {
        if (true and false)
                printf("Reality is inconsistent\n");
        else
                printf("What a relief!\n");

        return 0;
}
dijkstra:[~] g++-2.95 -o and and.c
and.c: In function `int main()':
and.c:4: parse error before `false'
and.c:10: confused by earlier errors, bailing out
zsh: exit 1     g++-2.95 -o and and.c
dijkstra:[~] g++-3.0 -o and and.c 
dijkstra:[~] dpkg -l g++-2.95 g++-3.0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  g++-2.95       2.95.4-11woody The GNU C++ compiler.
ii  g++-3.0        3.0.4-7        The GNU C++ compiler.

-- 
 - mdz


More information about the mythtv-dev mailing list