Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Frank Heckenbach
Subject: nestbug: bugs in gpcc with the use of --nested-comments
Date: 12 Jul 2000, 03:22:04
Tom Schneider wrote:
> This code demonstrates a bug in gpc:
>
> GNU Pascal version 20000707, based on gcc-2.95.2 19991024 (release).
>
> which when called on this program as:
>
> gpc --standard-pascal --nested-comments --transparent-file-names $nestbug.p -o $nestbug
>
> will object as follows:
>
> nestbug.p:54: parse error before `Documentation'
>
> because, although the --nested-comments is on, it still can't handle
> this unbalanced right curlie bracket: }
What was called `--nested-comments' in previous GPC versions, is now
called (more precisely, IMHO) `--no-mixed-comments'. The option
`--nested-comments' now means really nested comments like `{ { } }'.
BTW, this *is* described prominently in the NEWS file or the News
chapter in the GPC manual.
> 2. ADDITIONAL BUG: Note also that GPC capitalizes the word
> "Documentation", which is confusing and it should not do. Someone doing a
> case sensitive search would not find the problem!
That's why a case-sensitive search through Pascal code is a bad
idea, I guess...
> This occurs in other
> places in the code. GPC should NEVER change cases!!!! (Oh, I see. In
> German one capitalizes nouns. Perhaps this is why you thought to do it.
> The rest of the world does not and it will cause confusion and trouble.
> How about creating a --German command line option? :-)
It's not about German at all, as you should've noted from the
following facts:
- The original GPC was created in Finland.
- GPC also capitalizes verbs, adverbs, perpositions, non-words, etc.
Seriously, I think we've discussed this matter before, in connection
with `--transparent-file-names'. It's about avoiding conflicts with
(e.g.) libc identifiers. When GPC supports some other form of name
mangling, we can get away with this capitalization. If you like to
offer your help, be welcome, otherwise this will be done according
to our time schedules...
> {
> I infer that when comments are parsed gpc does not remember the kind of
> starting comment.
It does with `--no-mixed-comments'.
> 4. If the curlies around the above paragraph are deleted, the message is:
>
> nestbug.p:92: unterminated string or character constant
> nestbug.p:83: possible real start of unterminated constant
>
> The program is sensitive to single quote marks!
Of course. Since the comment was closed (though unintentionally, see
above), GPC expects Pascal code, and a single quote in Pascal code
is quite significant.
> The whole comment skipping code needs a careful overhaul!
Quite the opposite: It's just had a careful overhaul which implied a
redefinition of one option. Please change your command-line
accordingly.
> The program does a successful goto to the end of the code from
> the halt routine, so that bug is FIXED. :-) :-) Thank you!
Fine. (But you are aware that a Halt routine which does exactly this
is already built in?)
Frank
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).