Comeau C/C++ ist nicht so toll



  • In irgendeinem Thread wurde mir Comau empfohlen (http://www.comeaucomputing.com/tryitout/), weil sich dieser sich so an den Standard hält

    hab folgendes versucht:

    #include <stdio.h> 
    #include <stdbool.h>
    
    typedef struct {
    	_Bool		sign;
    	unsigned int	numerator;
    	unsigned int	denominator;
    } Rational;
    
    int main(void)
    {
    	printf("Hallo Welt!\n");
    }
    

    Folgende Fehlerausgabe:

    Comeau C/C++ 4.3.3 (Aug  6 2003 15:13:37) for ONLINE_EVALUATION_BETA1
    Copyright 1988-2003 Comeau Computing.  All rights reserved.
    MODE:strict errors C99 
    
    "ComeauTest.c", line 2: catastrophic error: could not open source file "stdbool.h"
      #include <stdbool.h>
                          ^
    
    1 catastrophic error detected in the compilation of "ComeauTest.c".
    Compilation terminated.
    

    Übersetzt hab ich mit folgenden Optionen:
    C99 mode (4.2.45.1 and above only)
    Compile in strict mode
    4.3.3 BETA August 4, 2003

    kann dieser Compiler nur mit Code für ein Freestanding Environment umgehen?
    Bin schon etwas entäuscht... 😞



  • Ziemlich dick steht am Anfang der Seite, daß nicht alle Header unterstützt werden, tgmath.h kennt er zB. auch nicht. _Bool kennt der Compiler aber, dafür brauchst Du kein stdbool.h.

    Die Featureliste (http://www.comeaucomputing.com/features.html) behauptet übrigens, daß das implementiert ist, schreib den Herren doch einfach eine liebe Mail, wenn dir die Problematik so unter den Nägeln brennt.



  • btw:
    Man verwendet _Bool nicht direkt, sondern genau wie in C++ bool. Dafür ist ja <stdbool.h> da, um dies entsprechend bereitzustellen.


Anmelden zum Antworten