bugGNU gettext - Bugs: bug #63866, error: expected expression


You are not allowed to post comments on this tracker with your current authentication level.

bug #63866: error: expected expression

Submitter:  Ryan Schmidt <ryandesign>
Submitted:  Sat 04 Mar 2023 09:00:21 AM UTC
Category:  Build Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  haible
Open/Closed:  Open

Sat 04 Mar 2023 08:48:39 PM UTC, comment #3: 

Thanks for the report.

You have found the relevant corrections that happened so far in the gnulib git history.

We have only found recently how to translate LLVM versions from/to Apple clang versions, namely through this table: https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2

The next versions of GNU gettext will also use more recent versions of gnulib.

The most relevant question is therefore: Is the issue fixed in the current gnulib? To answer this question, please could you download
and build it through

make check


Bruno Haible <haible>
Group administrator
Sat 04 Mar 2023 09:52:09 AM UTC, comment #2: 

For gettext 0.21 we were applying patches to fix `_GL_HAS_ATTRIBUTE`:



When updating to gettext 0.21.1 I removed those patches because they were already included. But maybe it's not using exactly the right version of Apple clang as a cutoff for whether or not `__has_attribute` works.

The first commit references the LLVM 3.5.0 release notes saying that `__has_attribute` is unreliable in earlier versions and so the first commit excludes clang versions earlier than 3.5.0. Fine. The next commit then adds code to handle Apple clang's different versioning, excluding Apple clang versions with `__apple_build_version__` < 6000000. The problem is there is not an exact correspondence between Apple clang and non-Apple clang versions. Apple clang versions are based on some intermediate stage of non-Apple clang development. For example Apple clang 6.0 is "based on LLVM 3.5svn", so some point before the LLVM 3.5.0 release—perhaps a point before they had fixed `__has_attribute`. Apple clang 6.1.0 was "based on LLVM 3.6.0svn" so that would surely include the `__has_attribute` fix. Now to find the value of `__apple_build_version__` for Apple clang 6.1.0 (or you could just check `__clang_major__` and `__clang_minor__`).

Ryan Schmidt <ryandesign>
Sat 04 Mar 2023 09:26:04 AM UTC, comment #1: 

This is a new problem in gettext 0.21.1. 0.21 built fine.

For now, I've worked around the problem by using a different compiler (non-Apple clang 3.7) to build it.

Ryan Schmidt <ryandesign>
Sat 04 Mar 2023 09:00:21 AM UTC, original submission:  

gettext fails to build on OS X 10.9 with Xcode v6.2's Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn).


x-c.c:1486:7: warning: declaration does not declare anything [-Wmissing-declarations]
../libgrep/attribute.h:150:21: note: expanded from macro 'FALLTHROUGH'
../config.h:2844:36: note: expanded from macro '_GL_ATTRIBUTE_FALLTHROUGH'
# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
x-c.c:1509:15: error: expected expression
../libgrep/attribute.h:150:21: note: expanded from macro 'FALLTHROUGH'
../config.h:2844:36: note: expanded from macro '_GL_ATTRIBUTE_FALLTHROUGH'
# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))

It builds fine with later and earlier macOS / Apple clang versions.

I reported the same problem in neovim some years ago; see https://github.com/neovim/neovim/issues/10125 for the report and how they fixed it.

Ryan Schmidt <ryandesign>


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

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 (Posted a comment)
  • -email is unavailable- added by ryandesign (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.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-03-04 haible StatusNone Need Info
        Assigned toNone haible

    Back to the top

    Powered by Savane 3.12