This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: build errorï pasting "sctps_ch_rcvd" and "[" does not give a valid preprocessing token
- From: Martin Sebor <msebor at gmail dot com>
- To: wangwzc <wangwzc at sina dot com>, gcc-help at gcc dot gnu dot org
- Date: Fri, 06 Feb 2015 09:42:07 -0700
- Subject: Re: build errorï pasting "sctps_ch_rcvd" and "[" does not give a valid preprocessing token
- Authentication-results: sourceware.org; auth=none
- References: <1423188981472-1118458 dot post at n5 dot nabble dot com>
On 02/05/2015 07:16 PM, wangwzc wrote:
I use gcc version 3.4.4, build the following lines, but it the following
error, what does it means, it seem no error according the C99 standard. Is
it a gcc bug?
sctp_input.c:3928:1: pasting "sctps_ch_rcvd" and "[" does not give a valid
preprocessing token
#define SCTP_CHUNK_STAT_INCR(chk_id, name) \
atomic_add_int(&sctpstat.sctps_ch_##name##[chk_id], 1);
The result of the ## operator is required by the C standard to
be a valid preprocessing token. In the case above, the result
of ...rcvd ## [ is not a valid token (it would be two), and
hence the diagnostic. The second ## operator serves no useful
purpose and should be removed.
Martin