Tangential question to Alan D - a historical throwback
Hi Alan, I'm popping this question on this list because a) the file in question (attached) has your copyright on it (NetworkRADIUS), and because this involves what appears to be historical (I can't find the file in Github). The question is about this declaration: extern const DICT_ATTR const *nr_dict_attr_names[]; In C++ this is ok, but in C (when pedantic mode is on), this generates the duplicate-decl-declaration warning (and subsequent error). So my question is this: How do we make that go away? :-) Regards Stefan Paetow Moonshot Industry & Research Liaison Coordinator t: +44 (0)1235 822 125 gpg: 0x3FCE5142 xmpp: stefanp@jabber.dev.ja.net skype: stefan.paetow.janet jisc.ac.uk Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.
On Nov 15, 2017, at 8:03 AM, Stefan Paetow <Stefan.Paetow@jisc.ac.uk> wrote:
The question is about this declaration:
extern const DICT_ATTR const *nr_dict_attr_names[];
In C++ this is ok, but in C (when pedantic mode is on), this generates the duplicate-decl-declaration warning (and subsequent error). So my question is this: How do we make that go away? :-)
Hmm... not sure about that one. It should be fine. Alan DeKok.
extern const DICT_ATTR const *nr_dict_attr_names[];
In C++ this is ok, but in C (when pedantic mode is on), this generates the duplicate-decl-declaration warning (and subsequent error). So my question is this: How do we make that go away? :-)
Hmm... not sure about that one. It should be fine.
I can tweak the CFLAGS to ignore the duplicate-decl-declaration, just wasn't sure if deleting one of the two consts will make a difference in the C-style context... :-) Stefan Paetow Moonshot Industry & Research Liaison Coordinator t: +44 (0)1235 822 125 gpg: 0x3FCE5142 xmpp: stefanp@jabber.dev.ja.net skype: stefan.paetow.janet jisc.ac.uk Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.
On Nov 15, 2017, at 8:43 AM, Stefan Paetow <Stefan.Paetow@jisc.ac.uk> wrote:
I can tweak the CFLAGS to ignore the duplicate-decl-declaration, just wasn't sure if deleting one of the two consts will make a difference in the C-style context...
Deleting one of the const's is fine. Alan DeKok.
I can tweak the CFLAGS to ignore the duplicate-decl-declaration, just wasn't sure if deleting one of the two consts will make a difference in the C-style context...
Deleting one of the const's is fine.
Thanks for confirmation. :-) Stefan Paetow Moonshot Industry & Research Liaison Coordinator t: +44 (0)1235 822 125 gpg: 0x3FCE5142 xmpp: stefanp@jabber.dev.ja.net skype: stefan.paetow.janet jisc.ac.uk Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.
participants (2)
-
Alan DeKok -
Stefan Paetow