You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The program compile error as below. It take me 15 minutes to repare it - replace '/**' with '/*'. It let me down when i fixed the problem.
i think it is bug.
# command-line-arguments
In file included from /usr/include/stdio.h:33:0,
from ./comment.go:4:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:212:1: error: expected identifier or '(' before 'typedef'
typedef __SIZE_TYPE__ size_t;
^
In file included from /usr/include/stdio.h:74:0,
from ./comment.go:4:
/usr/include/libio.h:306:3: error: unknown type name 'size_t'
size_t __pad5;
^
/usr/include/libio.h:310:67: error: 'size_t' undeclared here (not in a function)
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
^
/usr/include/libio.h:338:62: error: expected declaration specifiers or '...' before 'size_t'
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
^
/usr/include/libio.h:347:6: error: expected declaration specifiers or '...' before 'size_t'
size_t __n);
^
/usr/include/libio.h:469:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_IO_sgetn'
extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t);
^
In file included from ./comment.go:4:0:
/usr/include/stdio.h:319:35: error: expected declaration specifiers or '...' before 'size_t'
extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
^
/usr/include/stdio.h:325:47: error: expected declaration specifiers or '...' before 'size_t'
extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur;
^
/usr/include/stdio.h:337:20: error: expected declaration specifiers or '...' before 'size_t'
int __modes, size_t __n) __THROW;
^
/usr/include/stdio.h:344:10: error: expected declaration specifiers or '...' before 'size_t'
size_t __size) __THROW;
^
/usr/include/stdio.h:386:44: error: expected declaration specifiers or '...' before 'size_t'
extern int snprintf (char *__restrict __s, size_t __maxlen,
^
/usr/include/stdio.h:390:45: error: expected declaration specifiers or '...' before 'size_t'
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
^
/usr/include/stdio.h:666:11: error: expected declaration specifiers or '...' before 'size_t'
size_t *__restrict __n, int __delimiter,
^
/usr/include/stdio.h:669:9: error: expected declaration specifiers or '...' before 'size_t'
size_t *__restrict __n, int __delimiter,
^
/usr/include/stdio.h:679:8: error: expected declaration specifiers or '...' before 'size_t'
size_t *__restrict __n,
^
/usr/include/stdio.h:709:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread'
extern size_t fread (void *__restrict __ptr, size_t __size,
^
/usr/include/stdio.h:715:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite'
extern size_t fwrite (const void *__restrict __ptr, size_t __size,
^
/usr/include/stdio.h:737:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread_unlocked'
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
^
/usr/include/stdio.h:739:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite_unlocked'
extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
^
The text was updated successfully, but these errors were encountered:
I don't think just looking for * at the beginning of the import "C" comment makes much sense. While it would be nice to do a better job on the C comment in general, I don't think that specific problem is common.
I don't think it's a good idea to put c code into c comment block. It's better using like ''' '''' as c code block. But it can't be changed now. The comment as below will works fine, I hope. Because the java/js programmer using the style frequently( and the comment is legal in c/c++/go), so I guess most people will suffer the problem.
/****
*/
ianlancetaylor
changed the title
cgo comment unreasonable
cmd/cgo: cgo comment unreasonable
Jan 26, 2016
The program compile error as below. It take me 15 minutes to repare it - replace '/**' with '/*'. It let me down when i fixed the problem.
i think it is bug.
The text was updated successfully, but these errors were encountered: