Bug 199041 - [sparse-llvm] Provide a mode to disable macros for var args
Summary: [sparse-llvm] Provide a mode to disable macros for var args
Status: ASSIGNED
Alias: None
Product: Tools
Classification: Unclassified
Component: Sparse (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Luc Van Oostenryck
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-06 22:41 UTC by Dibyendu Majumdar
Modified: 2018-11-19 23:07 UTC (History)
1 user (show)

See Also:
Kernel Version: N/A
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Dibyendu Majumdar 2018-03-06 22:41:43 UTC
Sparse currently defines macros that emulate var args. However these macros do not make sense when a backend is being used to generate code; the macros result in bad code being generated and the resulting code crashes.

There should be a code generation mode flag that if set should disable these macros or redefine them to generate error at compile time. This mode should be enabled when the sparse-llvm backend is being used.
Comment 1 Luc Van Oostenryck 2018-11-19 23:07:08 UTC
Disabling the macro or generate an error is not really an option.
What need to be done is to add support for varags at the IR level.

Note You need to log in before you can comment on or make changes to this bug.