From: Ken Brown <kbrown@cornell.edu>
To: cygwin-devel <cygwin-developers@cygwin.com>
Subject: Errors building cygwin with latest gcc
Date: Wed, 25 Aug 2021 18:03:36 -0400 [thread overview]
Message-ID: <e95e6ed7-b6ef-33f3-d62a-a65e4872e6df@cornell.edu> (raw)
With the recently uploaded gcc-11.2.0, I'm seeing three types of errors when
building cygwin:
1. In file included from ../../../../../newlib-cygwin/winsup/utils/mingw/path.cc:1:
../../../../../newlib-cygwin/winsup/utils/mingw/../path.cc: In function ‘char*
conv_fstab_spaces(char*)’:
../../../../../newlib-cygwin/winsup/utils/mingw/../path.cc:286:18: error: ISO
C++17 does not allow ‘register’ storage class specifier [-Werror=register]
286 | register char *sp = field;
Removing all the 'register' specifiers fixes these and I guess is harmless.
2. In member function ‘int dumper::dump_module(asection*, process_module*)’,
inlined from ‘int dumper::dump_module(asection*, process_module*)’ at
../../../../newlib-cygwin/winsup/utils/dumper.cc:533:1:
../../../../newlib-cygwin/winsup/utils/dumper.cc:562:11: error: ‘char*
strncpy(char*, const char*, size_t)’ writing 16 bytes into a region of size 1
overflows the destination [-Werror=stringop-overflow=]
562 | strncpy (header.elf_note_header.name, "win32module", NOTE_NAME_SIZE);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../../newlib-cygwin/winsup/utils/dumper.cc:25:
../../../../newlib-cygwin/winsup/../include/elf/external.h: In member function
‘int dumper::dump_module(asection*, process_module*)’:
../../../../newlib-cygwin/winsup/../include/elf/external.h:169:17: note:
destination object ‘Elf_External_Note::name’ of size 1
169 | char name[1]; /* Start of the name+desc data */
The code contains
#pragma GCC diagnostic ignored "-Wstringop-overflow"
which should have prevented that error, shouldn't it?
3. ../../../../newlib-cygwin/winsup/cygwin/miscfuncs.cc: In member function
‘void* thread_allocator::_alloc(SIZE_T)’:
../../../../newlib-cygwin/winsup/cygwin/miscfuncs.cc:522:5: error:
‘MEM_EXTENDED_PARAMETER::<unnamed struct>’ has no non-static data member named
‘Pointer’
522 | };
This one completely mystifies me, given the definition of MEM_EXTENDED_PARAMETER
in /usr/include/w32api/winnt.h. Is there some problem with the use of an
unnamed struct and unnamed union in that definition?
Ken
reply other threads:[~2021-08-25 22:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e95e6ed7-b6ef-33f3-d62a-a65e4872e6df@cornell.edu \
--to=kbrown@cornell.edu \
--cc=cygwin-developers@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).