[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-cxx-dev
Subject:    Re:  CXX-DEV: "##" pre processor with aCC
From:       Dennis Handly <dhandly () cup ! hp ! com>
Date:       2002-07-30 6:26:20
[Download RAW message or body]

>Please consider the following program.
typedef struct NETE_VERSION_INFO {
    char * m_version_string;
} nete_version_info_t;

This struct should have "const char*" and you can remove the cast below.

>#define LOCAL_VERSION_STRING (char*)"@(#)P version " VERSION_STRING " " NAME_STRING

>I get following warnings:
>Warning (anachronism) 823: Redundant preprocessing concatenation operation
>results in two valid preprocessing tokens.

This says you can't use the ## operator, on the token [ and smexec.
(The strong nuclear force does not help you to concatenate them. :-)

>How can I do away with these warnings???
Ajay Bansal

You need to work on strings, and not use stringify of paste_tokens:

#define NAME_STRING "[" stringify(TARGETNAME) "]"
I suppose not calling paste_tokens would also work:
#define NAME_STRING stringify([TARGETNAME])
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE cxx-dev
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic