Comments (8)
Yes, is not OS X specific. When you try to build it on Linux with clang fails also.
Clang warns about array boundaries and in this case there is a negative index in /py/vm.c:81 and /py/vm.c:451
Anyway it can be built if you edit the Makefile inside unix dir and delete "-Werror" from CFLAGS.
from micropython.
Yes, but since it's likely relying on undefined behaviour it'd be best to change it into something that doesn't trigger a warning - to avoid weird bugs later on.
from micropython.
I'll try to have a look to the code later and see whats the point on that negative index.
from micropython.
There is no bug: it's using stack allocated memory for the array, and pointing to the element before the start of the array. The pointer is pre-incremented, so won't write outside the array.
The proper fix is to find a way to write such code so it doesn't give a warning.
from micropython.
Yup, you can try to avoid array subscript syntax, i.e. &array[-1] => array - 1 . If clang would complain even about that, then it's a real smartass ;-).
from micropython.
I've pushed a change, as suggested by @pfalcon . Can @mikaeleiman please test it? Compile and run the tests/basics/run-tests script.
from micropython.
Working for me now (clang 3.3 on Debian Sid).
Terminal output: http://pastebin.com/AidWEhYM
from micropython.
I had sent a private message to dpgeorge about this issue, and am glad to see it has been patched already. And I will move all my comments to this issue section. Thanks.
from micropython.
Related Issues (20)
- ESP32 Outputting Garbage in REPL HOT 1
- ValueError: incompatible .mpy file HOT 2
- Raspberry Pi Pico _thread OSError: TinyUSB callback can't recurse HOT 5
- array: Add typecode property HOT 3
- from_bytes, sign=True not recognized, behaves differently in micropython than in python HOT 2
- esp32: Enabling debug printers bootloops ESP32C3 boards
- Suggestion for faster collection of sumbodules
- Micropython BLE has higher latency than Arduino. Is there any way to reduce it? HOT 8
- BLE with multiple periperals (OSError: [Errno 107] ENOTCONN) HOT 3
- Enable Hardware I2C2 to Portenta C33 Port
- Inconsistent thread behavior in different versions of MicroPython on ESP32 HOT 4
- Micropython allows uninitialised, invalid LAN MAC addresses on network
- Freebsd build failing; regression HOT 3
- Adding Bluetooth , audio, mic well compatibility with it HOT 2
- SAMD: Support SAMD internal flash and QSPI flash simultaneously HOT 3
- docs: explain optional global-interpreter-lock HOT 1
- os.dupterm() appears never to call readinto() method on ESP32_S2 and C3 HOT 1
- super().__init__(*args, **kwargs) doesn't pass kwargs to parent C class. HOT 3
- os.statvfs() misreports first 9 values on the list as 0 on Arduino Nano RP2040 Connect HOT 17
- rp2: Board does not enable USB after hard reset if an error is raised in boot.py. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micropython.