Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669746 - mail-mta/nullmailer-2.0-r1 - clang: inject.cc:211:3: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'unsigned int' in initializer list [-Wc++11-narrowing]
Summary: mail-mta/nullmailer-2.0-r1 - clang: inject.cc:211:3: error: non-constant-expr...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-27 08:00 UTC by moxian
Modified: 2019-04-01 20:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info mail-mta/nullmailer (emerge-info.log,5.64 KB, text/plain)
2018-10-27 08:00 UTC, moxian
Details
build.log.gz (build.log.gz,4.11 KB, application/gzip)
2018-10-27 08:02 UTC, moxian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description moxian 2018-10-27 08:00:28 UTC
Created attachment 553288 [details]
emerge --info mail-mta/nullmailer

From the compile log:

<...>
clang++ -DHAVE_CONFIG_H -I. -I..  -I../lib -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -O2 -pipe -fno-rtti -fno-except
ions -W -Wall -c -o smtpd.o smtpd.cc
inject.cc:211:3: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'unsigned int' in initializer
      list [-Wc++11-narrowing]
  X(Sender,            T,F,F,F,F), // 0
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inject.cc:207:38: note: expanded from macro 'X'
#define X(N,IA,IR,IS,IRS,R) { #N ":",strlen(#N ":"),\
                                     ^~~~~~~~~~~~~~
inject.cc:211:3: note: insert an explicit cast to silence this issue
  X(Sender,            T,F,F,F,F), // 0
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inject.cc:207:38: note: expanded from macro 'X'
#define X(N,IA,IR,IS,IRS,R) { #N ":",strlen(#N ":"),\
                                     ^~~~~~~~~~~~~~
<...>

The package emerges fine with gcc

$ clang --version
clang version 5.0.2 (tags/RELEASE_502/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/5/bin

$ gcc --version
gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Comment 1 moxian 2018-10-27 08:02:30 UTC
Created attachment 553290 [details]
build.log.gz