Token pasting

Philipp Thomas pthomas@suse.de
Mon Jan 8 02:44:00 GMT 2001


Hi Neil,

while compiling latest CVS ALSA drivers with gcc 2.97, I get warnings like
the following:

warning: pasting "__module_generic_string_info_parm_snd_major" and "[" does not give a valid preprocessing token

this results ultimately from this macro in alsas initval.h:

#define MODULE_GENERIC_STRING(name, string) \
static const char __module_generic_string_##name## [] \
  __attribute__ ((section(".modstring"))) = #name "=" string;

Could you be so kind and explain me why this leads to the above warning and
possibly how too fix it? My knowlege on token pasting is very limited and
thus I'd appreciate getting help from someone who had to make himself
knowledgable (I guess more then you would have liked :).

Thanks in advance
Philipp

-- 
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany

Penguins shall save the dinosaurs
                          -- Handelsblatt about Linux on S/390


More information about the Gcc mailing list