Operating System - HP-UX
1754020 Members
7334 Online
108811 Solutions
New Discussion юеВ

Warning #3665-D: concatenation with "xy" in macro "yz" does not create a valid token

 
SOLVED
Go to solution
Karl_BAG
Occasional Advisor

Warning #3665-D: concatenation with "xy" in macro "yz" does not create a valid token

We are porting from PA-RISC -> Itanium / HPUX11.11 -> HPUX11.31. During the compilation of dvav.c I get a couple of warnings #3665, which I don't know how to solve:

"dvav.c", line 986: warning #3665-D: concatenation with "TimeRef" in macro "INSTALL_AV" does not create a valid token INSTALL_AV (TimeRef);
                                             ^

If I substitute "&av.##x" with "&av.TimeRef" no warnings are reported, so I guess there is some problem with the precompiler.

 

----------------------------------------------------------------------------------------------------------------------

cc +Olit=const -Aa -c +e +O3 -z +w2 +DD32  -D _XOPEN_SOURCE_EXTENDED  -D _HPUX_SOURCE  -D HOST_WKS 

-D ENV_HPUX  -D VERSION='"akt"' -I/usr1/xfm/v3.3/include -I/usr/include/Motif2.1 -I/usr/include/X11
-I/usr/include/X11R6 -D NeedFunctionPrototypes=1 -c dvav.c

 

----------------------------------------------------------------------------------------------------------------------

#define STR_LEN    30

....
....

#define INSTALL_AV(x)                   \
                                                         \
        FmAttachAv (#x, &av.##x);       \

....
....


{
  /* Visualisierungsfenster */
  /* ---------------------- */
  char TimeRef          [STR_LEN];
  char TimeStamp        [STR_LEN];
  char VisStatus        [STR_LEN];
  char VisStatusColor   [STR_LEN];
  char AnzStatus        [STR_LEN];
  char AnzStatusColor   [STR_LEN];
  char TrigStatus       [STR_LEN];
  char TrigStatusColor  [STR_LEN];
  char ErrorStatus      [STR_LEN];
  char ErrorStatusColor [STR_LEN];
  char CfgName          [STR_LEN];
  char CfgNameColor     [STR_LEN];
  char CfgVersion       [STR_LEN];
  char CfgVersionColor  [STR_LEN];
  char SnapFile         [STR_LEN];
  char SnapFileColor    [STR_LEN];
  char EnvColor         [STR_LEN];
} av;

....
....

INSTALL_AV (TimeRef);


Thanks
Karl

2 REPLIES 2
Dennis Handly
Acclaimed Contributor
Solution

Re: Warning #3665-D: concatenation with "xy" in macro "yz" does not create a val

>I get a couple of warnings #3665, which I don't know how to solve:
>warning #3665-D: concatenation with "TimeRef" in macro "INSTALL_AV" does not create a valid token INSTALL_AV (TimeRef);

 

The warning means what it says.  You have an illegal use of the ## operator.  You are trying to glue two tokens that can't be glued.

 

>If I substitute "&av.##x" with "&av.TimeRef" no warnings are reported

 

The correct solution is to use: &av.x

Karl_BAG
Occasional Advisor

Re: Warning #3665-D: concatenation with "xy" in macro "yz" does not create a val

Hej Dennis

 

Thanks for your help. In this case i'll just fix the affected lines.

 

 

Karl