C18 Fehlermeldung

Gast #1403190
Lesenswert?

Hi

Ich arbeite im Moment mit einem Micrchip stack herum. Beim Compilieren 
bekomm ich "syntax error" in der datei ctype.h. Die Zeilenangabe führt 
mich hierhin:
1
int isalnum (PARAM_SCLASS int c);

wenn ich die datei ctype.h versuchsweise ausklammere, bekomme ich eine 
syntax Fehlermeldung in der ersten Zeilen von:
1
typedef enum
2
{
3
    R1,     // R1 type response
4
    R1b,    // R1b type response
5
    R2,     // R2 type response
6
    R3,     // R3 type response 
7
    R7      // R7 type response 
8
}RESP;

hat jemand eine Idee?
Gast #1403222
Lesenswert?

das war auch mein erster Gedanke. ich hab nun mal die Kommentare 
gelöscht, um es übersichtlicher zu machen. ctype.c fängt schaut so aus:

[c]
#ifndef __CTYPE_H
#define __CTYPE_H

#define PARAM_SCLASS auto

int isalnum (PARAM_SCLASS int c);
int isalpha (PARAM_SCLASS int c);
int iscntrl (PARAM_SCLASS int c);
int isdigit (PARAM_SCLASS int c);
int isgraph (PARAM_SCLASS int c);
int islower (PARAM_SCLASS int c);
int isprint (PARAM_SCLASS int c);
int ispunct (PARAM_SCLASS int c);
int isspace (PARAM_SCLASS int c);
int isupper (PARAM_SCLASS int c);
int isxdigit (PARAM_SCLASS int c);
int tolower (PARAM_SCLASS int c);
int toupper (PARAM_SCLASS int c);

#endif
[c]

Fehlermeldung:
C:\MCC18\h\ctype.h:6:Error: syntax error
#1403226
Lesenswert?

Versuch mal, dich in den Compiler reinzudenken. Kommentare ignoriert er 
und Präprozessor-Statements mitsamt den #includes sind alle schon vorher 
verarbeitet und somit weg. Das Resultat ist aus seiner Sicht nur noch 
ein einziger Text, bestehend aus Hauptfile und dem Inhalt aller 
Includes.

Und dann such die letzte für ihn relevante Zeile vor dem isalnum(). Im 
ctype.h steht die offensichtlich nicht, sondern vor dem #include 
<ctype.h>, entweder direkt dort, oder am Ende des Include-Files davor.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren