Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Apr 2004 17:30:13 +0200
From:      Matthias Andree <matthias.andree@gmx.de>
To:        Sam Varshavchik <mrsam@courier-mta.com>
Cc:        freebsd-current@freebsd.org
Subject:   GCC flaw in FreeBSD5? Cone 0.58 does not compile (was: [cone] Cone 0.58 released.)
Message-ID:  <m37jwg3pq2.fsf@merlin.emma.line.org>
In-Reply-To: <cone.1081547626.681533.4655.501@ny.email-scan.com> (Sam Varshavchik's message of "Fri, 09 Apr 2004 17:53:46 -0400")
References:  <cone.1081547626.681533.4655.501@ny.email-scan.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=

Sam Varshavchik <mrsam@courier-mta.com> writes:

> Download: http://www.courier-mta.org/download.php#cone
>
> This release expands support to many more East Asian character sets;
> adds the capability to search within the currently shown message; a
> configuration option for the default "post-and-mail" setting for netnews
> posts; and view/modify IMAP access control lists.
>
> Note: the new poll()-based internal I/O processing is not fully tested
> and may cause regressions on some platforms.

0.58 - without any patches - does not compile on FreeBSD 5-CURRENT:

gmake[2]: Entering directory `/tmp/root/ports/mail/cone/work/cone-0.58/libmail'
gmake  all-am
gmake[3]: Entering directory `/tmp/root/ports/mail/cone/work/cone-0.58/libmail'
Compiling mbox.C
mbox.C: In member function `bool mail::mbox::scan(mail::file&, mail::file*, 
   bool, std::set<std::string, std::less<std::string>, 
   std::allocator<std::string> >*, bool, mail::callback*)':
mbox.C:1246: error: base operand of `->' has non-pointer type `mail::file'
mbox.C:1283: error: base operand of `->' has non-pointer type `mail::file'
gmake[3]: *** [mbox.o] Error 1
gmake[3]: Leaving directory `/tmp/root/ports/mail/cone/work/cone-0.58/libmail'
gmake[2]: *** [all] Error 2

The code looks fine and compiles fine on SuSE Linux 8.2 with an updated
vanilla GCC 3.3.3. Given that mail::file has an operator FILE *() that
returns the FILE* pointer, I don't see what the compiler wants to tell
me. Cc:'ing FreeBSD-current.

> 1149  bool mail::mbox::scan(mail::file &scanFile,
> 1150                        mail::file *saveFile,
...
  1243                                  // Remember how big the saveFile was,
  1244                                  // originally.
  1245  
> 1246                                  if (fstat(fileno(*saveFile), &stat_buf) < 0)
  1247                                  {
  1248                                          return false;
  1249                                  }
  1250  
...
  1280                          {
  1281                                  // Potential short cut.
  1282  
> 1283                                  if (fstat(fileno(scanFile), &stat_buf) < 0)
  1284                                  {
  1285                                          return false;
  1286                                  }
  1287  


-bash-2.05b# gmake --version
GNU Make 3.80

-bash-2.05b# gcc --version (g++ is the same version, I checked)
gcc (GCC) 3.3.3 [FreeBSD] 20031106

Config.log is attached.

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m37jwg3pq2.fsf>