Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

compilation failing

Naveen_Tulabandula
133 Views
Hi
I donno why compilation is failing in 2nd case.
command to compile
=============================================
icl /c /FI:stubksm6888.h try.c
icl /c /FI:stubksm6888.h try2.c
=============================================
case 1
=============================================
#include
struct ksllt
{
int a;
int b;
};
typedef struct ksllt ksllt;
typedef int sword;
#define KSLLATDW(name, descrip, cleanup, level, wtcls)                \\
        KSLLATDV(name, descrip, cleanup, level)                       \\
        KSLEVTDX3(name##lf_, "latch: " descrip, "address",  "number", \\
                  "tries", 0, 0, wtcls)
#define KSLLATDV(name, descrip, cleanup, level) KSMSGADV(ksllt, name)
#define KSLEVTDX3(name, descrip, p1text, p2text, p3text,flags,callbacks,cls) \\
        KSLEVTDV(name, descrip, p1text, p2text, p3text, flags, callbacks, cls,\\
                 descrip)
#define KSLEVTDV(name, descrip, p1text, p2text, p3text, flags, callbacks, \\
                 cls, display_name) \\
        KSMSGADV(sword, name)
#define KSMSGADV(type,name) extern type name;
KSLLATDW(ksmsal_, "ksm", 0, 0, 0)
main()
{
printf("done.\\n");
}
#include struct ksllt{int a;int b;};typedef struct ksllt ksllt;typedef int sword;
#define KSLLATDW(name, descrip, cleanup, level, wtcls)                \\        KSLLATDV(name, descrip, cleanup, level)                       \\        KSLEVTDX3(name##lf_, "latch: " descrip, "address",  "number", \\                  "tries", 0, 0, wtcls)
#define KSLLATDV(name, descrip, cleanup, level) KSMSGADV(ksllt, name)
#define KSLEVTDX3(name, descrip, p1text, p2text, p3text,flags,callbacks,cls) \\        KSLEVTDV(name, descrip, p1text, p2text, p3text, flags, callbacks, cls,\\                 descrip)
#define KSLEVTDV(name, descrip, p1text, p2text, p3text, flags, callbacks, \\                 cls, display_name) \\        KSMSGADV(sword, name)
#define KSMSGADV(type,name) extern type name;KSLLATDW(ksmsal_, "ksm", 0, 0, 0)main(){
printf("done.\\n");}
=============================================
case 2
=============================================
#include
struct ksllt
{
int a;
int b;
};
typedef struct ksllt ksllt;
typedef int sword;
#define KSLLATDW(name, descrip, cleanup, level, wtcls)                \\
  KSLLATDW2(name, descrip, cleanup, level, wtcls, descrip)
#define KSLLATDW2(name, descrip, cleanup, level, wtcls, display_name) \\
  KSLLATDV2(name, descrip, cleanup, level, display_name)              \\
  KSLEVTDY3(name##lf_, "latch: " descrip, "address",  "number",       \\
            "tries", 0, 0, wtcls, "latch: " display_name)
#define KSLLATDV2(name, descrip, cleanup, level, display_name) \\
        KSMSGADV(ksllt, name)
#define KSLEVTDY3(name, descrip, p1text, p2text, p3text, \\
                  flags, callbacks, cls, display_name)   \\
        KSLEVTDV(name, descrip, p1text, p2text, p3text,  \\
                 flags, callbacks, cls, display_name)
#define KSLEVTDV(name, descrip, p1text, p2text, p3text, flags, callbacks, \\
                 cls, display_name) \\
        KSMSGADV(sword, name)
#define KSMSGADV(type,name) extern type name;
KSLLATDW(ksmsal_, "ksm", 0, 0, 0)
main()
{
printf("Done.\\n");
}
=============================================
stubksm6888.h
=============================================
#define ksmsal_ (*ksmsal_)
=============================================
0 Kudos
2 Replies
JenniferJ
Moderator
133 Views
does "cl" compile ok? 
Jennifer
TimP
Black Belt
133 Views
It's not possible to save from this screen without incurring additional formatting errors.  Correcting formatting errors allows compilation.  So I suspect some of the apparent formatting errors are in your source, and more were introduced as you pasted to the screen.
Reply