Your message dated Tue, 22 Sep 2009 12:13:38 +0200 (CEST)
with message-id <[email protected]>
has caused the   report #547798,
regarding [gettext]: gettext.h incompatible with g++ -pedantic (error: ISO C++ 
forbids variable length array ‘msg_ctxt_id’)
to be marked as having been forwarded to the upstream software
author(s) [email protected]

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
547798: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547798
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Hello.

I received this from the Debian bug system:

---------- Forwarded message ----------
From: Jens Seidel <[email protected]>
To: [email protected]
Date: Tue, 22 Sep 2009 11:20:39 +0200
Subject: Bug#547798: [gettext]: gettext.h incompatible with g++ -pedantic
    (error: ISO C++ forbids variable length array [UTF-8] msg_ctxt_id)

Package: gettext
Version: 0.17-7
Severity: important

Hi,

compiling
#include "/usr/share/gettext/gettext.h"

int main()
{
  return 0;
}
with g++ -pedantic results in:

/usr/share/gettext/gettext.h: In function ÿÿconst char* dcpgettext_expr(const
char*, const char*, const char*, int)ÿÿ:
/usr/share/gettext/gettext.h:201: error: ISO C++ forbids variable length
array ÿÿmsg_ctxt_idÿÿ
/usr/share/gettext/gettext.h: In function ÿÿconst char*
dcnpgettext_expr(const char*, const char*, const char*, const char*, long
unsigned int, int)ÿÿ:
/usr/share/gettext/gettext.h:247: error: ISO C++ forbids variable length
array ÿÿmsg_ctxt_idÿÿ

I work around it by using

 #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
-  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) && !__cplusplus \

but detecting a macro which is set in pedantic mode is probably better.

Jens


--- End Message ---

Reply via email to