mainGNU gettext - Support: sr #108743, Inconsistent definition of...

 
 

sr #108743: Inconsistent definition of libintl_gettext_germanic_plural

Submitter:  Dagobert Michelsen <dagobert>
Submitted:  Fri 06 Feb 2015 10:01:52 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  ueno
Open/Closed:  Closed Operating System:  Other Unix
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 25 May 2016 06:30:47 AM UTC, comment #4: 

pan7: you are right, this is a regression after commit d5c2a516.
I have pushed a fix as:
http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=77dde02ef05e63e0ae2b113546e8adb26a962e29

Sorry for not responding earlier and thanks for the investigation.

Daiki Ueno <ueno>
Group administrator
Thu 13 Aug 2015 10:07:49 AM UTC, comment #3: 

Where is PLURAL_PARSE aka libintl_gettextparse aka __gettextparse aka parse_plural_expression defined?
Where is GERMANIC_PLURAL aka germanic_plural aka __gettext_germanic_plural aka libintl_gettext_germanic_plural defined?
There is only declarations.

<pan7>
Wed 12 Aug 2015 06:47:17 AM UTC, comment #2: 

gettext-runtime\intl\plural-exp.c(71): error C2373: 'libintl_gettext_germanic_plural' : redefinition; different type modifiers
1>          gettext-0.19.5.1\gettext-runtime\intl\plural-exp.h(111) : see declaration of 'libintl_gettext_germanic_plural'

removing const is fixing it for me.

<pan7>
Fri 06 Feb 2015 07:39:20 PM UTC, comment #1: 


> "./plural-exp.c", line 71: identifier redeclared: libintl_gettext_germanic_plural


This code path is taken only when the compiler doesn't support C99:
http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/intl/plural-exp.c#n66

and Solaris Studio 12.3 supports C99:
http://docs.oracle.com/cd/E24457_01/html/E21990/bjabb.html

What happens if you add "-xc99=all,lib —Xc" to the compiler options?  I wonder why I didn't encounter the problem when I tested with the compiler on Solaris 11 (without any special compiler option).

Daiki Ueno <ueno>
Group administrator
Fri 06 Feb 2015 10:01:52 AM UTC, original submission:  

The function libintl_gettext_germanic_plural is once defined as const and once as non-const:

/bin/bash ../libtool  --tag=CC --mode=compile /opt/solarisstudio12.3/bin/cc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I. -I.. -D_REENTRANT -I/opt/csw/include -g   ./plural-exp.c
libtool: compile:  /opt/solarisstudio12.3/bin/cc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I. -I.. -D_REENTRANT -I/opt/csw/include -g ./plural-exp.c  -KPIC -DPIC -o .libs/plural-exp.o
"./plural-exp.c", line 71: identifier redeclared: libintl_gettext_germanic_plural
current : struct expression {int nargs, enum expression_operator {qmop(16), lor(15), land(14), not_equal(13), equal(12), greater_or_equal(11), less_or_equal(10), greater_than(9), less_than(8), minus(7), plus(6), module(5), divide(4), mult(3), lnot(2), num(1), var(0)} operation, union  {..} val}
previous: const struct expression {int nargs, enum expression_operator {qmop(16), lor(15), land(14), not_equal(13), equal(12), greater_or_equal(11), less_or_equal(10), greater_than(9), less_than(8), minus(7), plus(6), module(5), divide(4), mult(3), lnot(2), num(1), var(0)} operation, union  {..} val} : "plural-exp.h", line 111
cc: acomp failed for ./plural-exp.c

This should be consistent. Compilers as Sun Studio treat this mismatch as error.

Best regards -- Dago

Dagobert Michelsen <dagobert>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by pan7 (Posted a comment)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by dagobert (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-10 haible Assigned toNone ueno
    2016-05-25 ueno StatusNone Done
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code