This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Token pasting


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]