public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* gnats compiling error
@ 2001-03-09 14:25 Wes Barris
  2001-03-09 14:37 ` Gerald Pfeifer
  2001-03-11 10:48 ` Milan Zamazal
  0 siblings, 2 replies; 7+ messages in thread
From: Wes Barris @ 2001-03-09 14:25 UTC (permalink / raw)
  To: gnats-devel

I am trying to compile gnats (downloaded using cvs) on a Redhat 7
system.

It appears that a string is too long for gcc on Redhat 7:

gcc -c -I. -I. -I./../include  -g -O2 -W -Wall -W -Wall -ansi -pedantic -Werror -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-format  -DHAVE_CONFIG_H -DGNATSD_USER_ACCESS_FILE=\"/usr/local/share/gnats/gnatsd.access\" -DGNATSD_HOST_ACCESS_FILE=\"/usr/local/share/gnats/gnatsd.host_access\" -DDEFAULT_GNATS_SERVICE=\"support\" -DGLOBAL_DB_LIST_FILE=\"/usr/local/etc/gnats/databases\" -DGNATS_USER=\"gnats\" ./query-pr.c
cc1: warnings being treated as errors
./query-pr.c: In function `usage':
./query-pr.c:948: warning: string length `1617' is greater than the minimum length `509' ISO C89 is required to support
make[1]: *** [query-pr.o] Error 1
make[1]: Leaving directory `/home/wes/gnats/gnats'
make: *** [all-gnats] Error 2

-----------------------------------------------------------------------
Wes Barris                                            wes@networkcs.com
Network Computing Services, Inc.                           612.626.8090
-----------------------------------------------------------------------
Today's fortune: How many weeks are there in a light year?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnats compiling error
  2001-03-09 14:25 gnats compiling error Wes Barris
@ 2001-03-09 14:37 ` Gerald Pfeifer
  2001-03-11 10:48 ` Milan Zamazal
  1 sibling, 0 replies; 7+ messages in thread
From: Gerald Pfeifer @ 2001-03-09 14:37 UTC (permalink / raw)
  To: Wes Barris; +Cc: gnats-devel

This is just a warning, not an error, but it is made an error by the
-Werror command-line option to GCC. If you remove this option, you should
be able to proceed.

Nevertheless, I'd consider this a GNATS bug (either this, or the use of
-Werror) which should be fixed.

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnats compiling error
  2001-03-09 14:25 gnats compiling error Wes Barris
  2001-03-09 14:37 ` Gerald Pfeifer
@ 2001-03-11 10:48 ` Milan Zamazal
  2001-03-11 16:20   ` Gerald Pfeifer
  1 sibling, 1 reply; 7+ messages in thread
From: Milan Zamazal @ 2001-03-11 10:48 UTC (permalink / raw)
  To: Wes Barris; +Cc: gnats-devel

>>>>> "WB" == Wes Barris <wesb@networkcs.com> writes:

    WB> It appears that a string is too long for gcc on Redhat 7:

Sigh!  Thanks for the report.

>>>>> "GP" == Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:

    GP> Nevertheless, I'd consider this a GNATS bug (either this, or the
    GP> use of -Werror) which should be fixed.

I don't consider the -Werror option a bug, thus the string should be
fixed.  I don't have access to the standard and gcc 2.95.3 (which I use)
compiles the file without any complaints so could someone provide me
more details about that thing please?  Is it sufficient to simply split
the long string into several strings via string concatenation

  "..." "..." "..." "..."

?

Regards,

Milan Zamazal

-- 
Here is my advice, don't try to program the bleeding edge for the
general populace unless you really, really, really like migraines.
						   Neal H. Walfield

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnats compiling error
  2001-03-11 10:48 ` Milan Zamazal
@ 2001-03-11 16:20   ` Gerald Pfeifer
  2001-03-13 12:26     ` Milan Zamazal
  0 siblings, 1 reply; 7+ messages in thread
From: Gerald Pfeifer @ 2001-03-11 16:20 UTC (permalink / raw)
  To: Milan Zamazal; +Cc: Wes Barris, gnats-devel

On 11 Mar 2001, Milan Zamazal wrote:
> I don't have access to the standard and gcc 2.95.3 (which I use)
> compiles the file without any complaints so could someone provide
> me more details about that thing please?

ISO C specififes a minimum string length that a conforming compiler must
be able to process. This is a lower bound and a decent compiler will not
have such a low limit, but to be an the safe side, current snapshots of
GCC and thus also GCC 3.0 (will) warn about strings exceeding this length.

> Is it sufficient to simply split the long string into several strings
> via string concatenation
>
>   "..." "..." "..." "..."

No, I don't think so, for the result will be one big string.

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnats compiling error
  2001-03-11 16:20   ` Gerald Pfeifer
@ 2001-03-13 12:26     ` Milan Zamazal
  2001-03-13 12:37       ` Gerald Pfeifer
  0 siblings, 1 reply; 7+ messages in thread
From: Milan Zamazal @ 2001-03-13 12:26 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Wes Barris, gnats-devel

>>>>> "GP" == Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:

    >> Is it sufficient to simply split the long string into several
    >> strings via string concatenation
    >> 
    >> "..." "..." "..." "..."

    GP> No, I don't think so, for the result will be one big string.

Could someone please actually try it with the new gcc?  I can imagine
the ISO requirement only concerns contingent limited buffer size for
reading a lexical element enclosed by two double quotes.  I'd like to be
sure before doing the incredibly stupid thing of constructing the usage
description string in run time.

Thanks,

Milan Zamazal

-- 
Omigod, it's a flame war about a flame war.  You know, a meta-flame war!
                                                 Kenny Tilton in comp.lang.lisp

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnats compiling error
  2001-03-13 12:26     ` Milan Zamazal
@ 2001-03-13 12:37       ` Gerald Pfeifer
  2001-03-18 10:02         ` Milan Zamazal
  0 siblings, 1 reply; 7+ messages in thread
From: Gerald Pfeifer @ 2001-03-13 12:37 UTC (permalink / raw)
  To: Milan Zamazal; +Cc: Wes Barris, gnats-devel

On 13 Mar 2001, Milan Zamazal wrote:
> Could someone please actually try it with the new gcc?  I can imagine
> the ISO requirement only concerns contingent limited buffer size for
> reading a lexical element enclosed by two double quotes.

Bad news, Milan. :-(

I just constructed some test cases and indeed preprocessor string pasting
is no suitable workaround with current CVS sources of GCC (and what will
become GCC 3.0).

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnats compiling error
  2001-03-13 12:37       ` Gerald Pfeifer
@ 2001-03-18 10:02         ` Milan Zamazal
  0 siblings, 0 replies; 7+ messages in thread
From: Milan Zamazal @ 2001-03-18 10:02 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Wes Barris, gnats-devel

>>>>> "GP" == Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:

    GP> I just constructed some test cases and indeed preprocessor
    GP> string pasting is no suitable workaround with current CVS
    GP> sources of GCC (and what will become GCC 3.0).

Thanks for checking it.  I've split the help printing into several
calls, I'll commit the change soon.

Milan Zamazal

-- 
  _/_\_/_  o     _\_/_\_  o     _/_\_/_  o     _\_/_\_  o    BEWARE!
-<_|_|_|_><--  -<_|_|_|_><--  -<_|_|_|_><--  -<_|_|_|_><--   *Bugs* are
   / \ /   o      \ / \   o      / \ /   o      \ / \   o     approaching!

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-03-18 10:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-09 14:25 gnats compiling error Wes Barris
2001-03-09 14:37 ` Gerald Pfeifer
2001-03-11 10:48 ` Milan Zamazal
2001-03-11 16:20   ` Gerald Pfeifer
2001-03-13 12:26     ` Milan Zamazal
2001-03-13 12:37       ` Gerald Pfeifer
2001-03-18 10:02         ` Milan Zamazal

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).