[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gperf bug
From: |
Andreas Schwab |
Subject: |
Re: gperf bug |
Date: |
25 Jun 2001 17:50:49 +0200 |
User-agent: |
Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.0.103 |
address@hidden (Morten Welinder) writes:
|> Hi,
|>
|> when gperf 2.7 is run with the arguments
|>
|> gperf -c -a -E -C -t -L C++ -Z MYCLASS -H hash -N lookup -k 1-5 -T -o
myfile.gperf
|>
|> it will generate code like
|>
|> -----------------------------------------------------------------------------
|> /* C++ code produced by gperf version 2.7 */
|> ..
|> inline unsigned int
|> MYCLASS::hash (register const char *str, register unsigned int len)
|> {
|> ...
|> }
|> ..
|> register int key = hash (str, len);
|> if (key <= MAX_HASH_VALUE && key >= 0)
|>
|> -----------------------------------------------------------------------------
|>
|> Clearly, "key" should be unsigned and the wasteful test against 0 should
|> be eliminated.
A good compiler will do that anyway.
|> (And perhaps gperf should use C++ comments in C++ mode.)
What's wrong with using correct comment syntax?
Andreas.
--
Andreas Schwab "And now for something
SuSE Labs completely different."
address@hidden
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
- gperf bug, Morten Welinder, 2001/06/25
- Re: gperf bug,
Andreas Schwab <=