Skip to content

Support for custom variadic functions? #167

Description

@VisenDev

Robert@Roberts-MacBook-Pro-2 ~/f/fth2c (master) [1]> ~/clone/pnut/build/pnut-sh fth2c.c

#!/bin/sh
set -e -u -f
LC_ALL=C

expected tok=;
current tok=identifier
Error occurred while parsing "fth2c.c"
  Message: unexpected token
  Offending Token: identifier
  Location: fth2c.c:11:12

Robert@Roberts-MacBook-Pro-2 ~/f/fth2c (master) [1]> head -n 20 fth2c.c

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>

#define strcap 64

void fatal_error(const char * fmt, ...) {
    va_list args; /*error occurs here*/
    va_start(args, fmt);
    vfprintf(stderr, fmt, args);
    va_end(args);
    abort();
}

int is_number(char * str) {
    if(*str == '-') {
        ++str;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions