Variadic macros compilation error HP C on HP-UX


 
Thread Tools Search this Thread
Operating Systems HP-UX Variadic macros compilation error HP C on HP-UX
# 1  
Old 02-04-2009
Question Variadic macros compilation error HP C on HP-UX

I have a macro defined like this:

Code:
#define MM7_RETURN(errorNr, ...)                                \
    {                                                           \
    if(errorNr != MM7_RS_NoError)                               \
        {                                                       \
        callStatePtr->inst->stats.nFailures++;            \
        if(callStatePtr->inst->AdaptorFlag == ADAPTOR)          \
            {                                                   \
            ReplyFaultResponse(callStatePtr, ##__VA_ARGS__);    \
            mm7rs = MM7_RS_ErrorNoExc;                          \
            }                                                   \
        else                                                    \
            {                                                   \
            mm7rs = errorNr;                                    \
            }                                                   \
        }                                                       \
    else                                                        \
        mm7rs = MM7_RS_NoError;                                 \
                                                                \
                                                                \
    goto error;                                                 \
    }

Sometimes I use it like this:
Code:
MM7_RETURN(MM7_RS_MalformedResponse);

Sometimes like this:

Code:
MM7_RETURN(MM7_RS_MalformedResponse, "pippo", "pluto");

The compiler is returning this error on the line where I use it.
error 1634: Missing arguments only allowed on intrinsic calls

Any clue?
I don't want to feed all parameters always !
# 2  
Old 02-13-2009
HP C/HP-UX Compiler Online Help : HP C/HP-UX Error Messages :
Error 1634
Missing arguments only allowed on intrinsic calls.

An actual argument was omitted in a call to a function, and that function was not declared as an intrinsic.

Add the intrinsic declaration (that is, #pragma INTRINSIC intrinsic_name) to the translation unit. If the function being called is not an intrinsic, supply the missing argument(s).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Combine GetOpt And Variadic Function In C

Been a while since my last post. Had a laptop die with my last project and still working to get it back. In the meantime I started another. In my main function I define some arguments with getopt: int main ( int argc, char **argv) { int option_index = 0; char *fname = "./commands"; ... (3 Replies)
Discussion started by: Azrael
3 Replies

2. Programming

Compilation Error

I am getting the below given errors for the following program though all the variables have been declared and used appropriately. Please Help. The environment is AIX. Error: ------ "gbsizeprofile.c", line 67.4: 1506-275 (S) Unexpected text 'void' encountered. "gbsizeprofile.c", line 67.10:... (2 Replies)
Discussion started by: yschd
2 Replies

3. Programming

pro*c compilation error

Hi, Recently our codes have been migrated to new server, whenever we compile any pro*c programs we receive the following errorl. please help >> make -f lib_util.mk all CC= ucbcc 4Compiling lib_util ### command line files and options (expanded): ### -xO3 -DNULL=0 -v -o lib_util.o... (0 Replies)
Discussion started by: satvd
0 Replies

4. Programming

Compilation error : Please help

state_field state_abvr = { "AL","ALABAMA", "AK","ALASKA", "AZ","ARIZONA", "AR","ARKANSAS", "CA","CALIFORNIA", "CO","COLORADO", "CT","CONNECTICUT", "DE","DELAWARE", "DC","DISTRICT-OF-COLUMBIA", "FL","FLORIDA", "GA","GEORGIA", "HI","HAWAII", "ID","IDAHO", "IL","ILLINOIS",... (1 Reply)
Discussion started by: jagan_kalluri
1 Replies

5. HP-UX

compilation error

hello everyone, here i am attempting to compile a c++ submodule.OS is HP-UX. here i am getting the following error. ====================================== "Make: Don't know how to make compile. Stop." =================================== could you pls somebody suggest why this error is... (2 Replies)
Discussion started by: mannam srinivas
2 Replies

6. Linux

c++ compilation error

Hello every one, here i am attempting to compile a c++ module using gcc.it is throwing a error . error: ==== > make -S dummyCHARGP /usr/local/bin/gcc -g -DDEBUG -DMAT -I. -I/swtemp/usbs/cc/unix-ce/root/subsys/lib/Linux/ -I/opt/dce/include -I/opt/dce/include/dce ... (12 Replies)
Discussion started by: mannam srinivas
12 Replies

7. Programming

Compilation error

I am compiling a software xchm on solaris 10. First i run './configure' There is no error. But when i start compiling using 'gmake' following error shown /usr/local/include/wx-2.6/wx/x11/brush.h: In copy constructor `wxBrush::wxBrush(const wxBrush&)':... (3 Replies)
Discussion started by: mansoorulhaq
3 Replies

8. Programming

compilation error

Hi, While trying compile a C++ file in UNIX with gcc whose make rule involves the usage of /usr/ccs/bin/as, I get the following error: /usr/ccs/bin/as: No such file or directory /usr/ccs/bin/as: error: write error on output file "<filename>.o" *** Error code 1 clearmake: Error: Build... (2 Replies)
Discussion started by: smanu
2 Replies

9. Programming

Regarding compilation error.

Hi All, I facing the following compilation error; when I implementing the following logic. ostrstream ostr; ostr << (( scAxsm.getRecord( i ).getField( 2 ).getShort())%12)!=0?(( scAxsm.getRecord( i ).getField( 2 ).getShort())/12+1) : (( scAxsm.getRecord( i ).getField( 2 ).getShort())/12) <<... (1 Reply)
Discussion started by: sweta
1 Replies

10. UNIX for Dummies Questions & Answers

Pthread compilation error

I have trouble compiling a pthread program on unix system which suppotrs pthreads it gives unresolved _pthread_create _pthread_exit error. what to do? (1 Reply)
Discussion started by: basavaraj_m
1 Replies
Login or Register to Ask a Question