Package: cproto
Version: 4.7x-1
Severity: normal

Dear Maintainer,

If you dget src:tgif 1:4.2.5-2 and run
  cproto -{P,F,C}"int f(a, b)" exec.c
you'll get a dump of the prototypes.

If you run
  cproto -a -{P,F,C}"int f(a, b)" exec.c
you'll instead get a lot of output,
/some/ prototypes changed,
but that output ends with
  exec.c:10428: syntax error at token ''
with the transformation edge at
-- >8 --
int PipeReachedEOF(FILE *fp)
{
   if (feof(fp)) return TRUE;

   /* this works because of non-blocking I/O */
   while (getc(fp) != EOF) ;
#ifdef EAGAIN
   if (errno == EINPROGRESS || errno == EAGAIN) {
#else /* ~EAGAIN */
   if (errno == EINPROGRESS) {
#endif /* EAGAIN */
      /* do nothing */
      return FALSE;
   }
   /* a real EOF */
   return TRUE;
}

int WaitForEvent(fp, fp_is_pipe, fp_is_named_pipe, pn_quit,
      what_to_do_with_x_events, pf_abort_callback, p_void)
   FILE *fp;
   int fp_is_pipe, fp_is_named_pipe, *pn_quit, what_to_do_with_x_events;
   AbortCallbackFunc *pf_abort_callback;
   void *p_void;
   /*
    * returns TRUE if there's character waiting in fp
    *
    * This routine is not really general purpose because characters can
    *       swallowed in the PipeReachedEOF() routine.
    * So if for any reason the content of the pipe is required, don't
    *       use this function!
    * fp_is_pipe is TRUE if fp is opened with popen().  This is not the
    *       same as a named pipe.
    * fp_is_named_pipe is TRUE if fp is a named pipe (S_IFIFO).
    */
{
   int rc=FALSE;

   *pn_quit = FALSE;
-- >8 --

exec.c starts by having 10427 lines,
so the error occurs one-past-the-end of that?

The compiler understands the code before and after the transformation
(so long as K&R declarations are allowed, of course).

Best,

-- System Information:
Debian Release: 12.11
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-35-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cproto depends on:
ii  gcc    4:12.2.0-3
ii  libc6  2.36-9+deb12u10

cproto recommends no packages.

cproto suggests no packages.

-- no debconf information

Attachment: signature.asc
Description: PGP signature

Reply via email to