mirror of https://github.com/tinygo-org/tinygo.git
wasmstm32webassemblymicrocontrollerarmavrspiwasiadafruitarduinocircuitplayground-expressgpioi2cllvmmicrobitnrf51nrf52nrf52840samd21tinygo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
622 B
33 lines
622 B
package main
|
|
|
|
/*
|
|
#warning some warning
|
|
|
|
typedef struct {
|
|
int x;
|
|
int y;
|
|
} point_t;
|
|
|
|
typedef someType noType; // undefined type
|
|
|
|
#define SOME_CONST_1 5) // invalid const syntax
|
|
#define SOME_CONST_2 6) // const not used (so no error)
|
|
#define SOME_CONST_3 1234 // const too large for byte
|
|
*/
|
|
import "C"
|
|
|
|
// Make sure that errors for the following lines won't change with future
|
|
// additions to the CGo preamble.
|
|
//line errors.go:100
|
|
var (
|
|
// constant too large
|
|
_ C.uint8_t = 2 << 10
|
|
|
|
// z member does not exist
|
|
_ C.point_t = C.point_t{z: 3}
|
|
|
|
// constant has syntax error
|
|
_ = C.SOME_CONST_1
|
|
|
|
_ byte = C.SOME_CONST_3
|
|
)
|
|
|