This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 83949 - APT doesn't support ellipses in fun-like macro params
Summary: APT doesn't support ellipses in fun-like macro params
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: Sun All
: P4 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-31 15:58 UTC by Vladimir Voskresensky
Modified: 2008-11-17 10:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2006-08-31 15:58:33 UTC
Gcc has following support for fun-like macro with variable number of params:
so, '...' and __VA_ARGS__ are used in macros

#define __glibcxx_function_requires1(...)

#define __glibcxx_function_requires2(...)                                 \
            __gnu_cxx::__function_requires< __gnu_cxx::#gcc -E fun_macro_ellips.cc
# 1 "fun_macro_ellips.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "fun_macro_ellips.cc"





__gnu_cxx::__function_requires< __gnu_cxx::1,3,2,11 >();
>();

__glibcxx_function_requires2(1,3,2,11)

__glibcxx_function_requires1(1,3,2,11)


========
Expands to:
=========

#gcc -E fun_macro_ellips.cc
# 1 "fun_macro_ellips.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "fun_macro_ellips.cc"





__gnu_cxx::__function_requires< __gnu_cxx::1,3,2,11 >();
Comment 1 Vladimir Voskresensky 2006-08-31 15:59:39 UTC
Will made small fix to prevent crashing.
Full support is postponed
Comment 2 Vladimir Voskresensky 2006-09-01 12:11:45 UTC
seems the original file was corrupted :-(
one more __VA_ARGS__ try:
========
#define __glibcxx_function_requires1(...)

#define __glibcxx_function_requires2(...)                                 \
            __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >();

__glibcxx_function_requires2(1,3,2,11)

__glibcxx_function_requires1(1,3,2,11)
=======
Comment 3 Vladimir Voskresensky 2008-11-17 10:35:00 UTC
it is supported already