Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

varadic argument #5

Open
mgood7123 opened this issue Jan 18, 2022 · 0 comments
Open

varadic argument #5

mgood7123 opened this issue Jan 18, 2022 · 0 comments

Comments

@mgood7123
Copy link

the following fails

#define MAC2STR(x) x[0],x[1],x[2],x[3],x[4],x[5]
#define FT_DEBUG(fmt, args...) if(pGlobalCtx && pGlobalCtx->debug_level>=2) printf("FT-dbg: "fmt, ##args)

FT_DEBUG("  %02x:%02x:%02x:%02x:%02x:%02x\n", MAC2STR(pCtx->wlan_intf_addr[i]));

gcc -E

if(pGlobalCtx && pGlobalCtx->debug_level>=2) printf("FT-dbg: "fmt, pCtx->wlan_intf_addr[i][0],pCtx->wlan_intf_addr[i][1],pCtx->wlan_intf_addr[i][2],pCtx->wlan_intf_addr[i][3],pCtx->wlan_intf_addr[i][4],pCtx->wlan_intf_addr[i][5]);

fcpp

Frexx C Preprocessor v1.5.1 Copyright (C) by FrexxWare 1993 - 2002.
Compiled Jan 18 2022
#line 1 "[stdin]"
cpp: "[stdin]", line 2: Error: #define syntax error
cpp: "[stdin]", line 2: Warning: Unexpected text in #control line ignored



cpp: "[stdin]", line 4: Warning: Wrong number of macro arguments for "FT_DEBUG"
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant