LVAL
- Macro
- August 22, 2025
Table of Contents
LVAL
LVAL
Description
Creates a temporary, addressable l-value from a given expression x
.
Parameters
Name | Direction | Description |
---|---|---|
x | in | The expression whose value needs to be addressable. |
Success
Returns addressable version of x
as first element of temporary array.
Failure
Function cannot fail - creates temporary storage unconditionally.
Usage example (Cross-references)
- In
Io.h:255
:
/// Used in following macros
///
#define IOFMT_LVAL_APPEND_COMMA(x) IOFMT(LVAL(x)),
#define IOFMT_APPEND_COMMA(x) IOFMT(x),
- In
JSON.c:250
:
LOG_ERROR(
"No unicode support '{.6}'. Unicode sequence will be skipped.",
LVAL(si.data + si.pos - 1)
);
StrIterMove(&si, 5);
- In
JSON.c:370
:
if (!ns.length) {
LOG_ERROR("Failed to parse number. '{.8}'", LVAL(saved_si.data + saved_si.pos));
StrDeinit(&ns);
return saved_si;
- In
Io.c:553
:
// Check if reading failed
if (!next || next == in) {
LOG_ERROR("Failed to read value for placeholder {}", LVAL(arg_index - 1));
return NULL;
}
- In
Io.c:568
:
LOG_ERROR(
"Input '{.8}' does not match format string '{.8}'",
LVAL(in ? in : "(null)"),
LVAL(p ? p : "(null)")
);
- In
Io.c:569
:
"Input '{.8}' does not match format string '{.8}'",
LVAL(in ? in : "(null)"),
LVAL(p ? p : "(null)")
);
return NULL;
- In
BitVec.c:528
:
if (start1 + len > bv1->length) {
LOG_FATAL("Range [{}:{}] exceeds bitvector1 length {}", start1, LVAL(start1 + len - 1), bv1->length);
}
if (start2 + len > bv2->length) {
- In
BitVec.c:531
:
}
if (start2 + len > bv2->length) {
LOG_FATAL("Range [{}:{}] exceeds bitvector2 length {}", start2, LVAL(start2 + len - 1), bv2->length);
}
- In
BitVec.c:570
:
if (start1 + len > bv1->length) {
LOG_FATAL("Range [{}:{}] exceeds bitvector1 length {}", start1, LVAL(start1 + len - 1), bv1->length);
}
if (start2 + len > bv2->length) {
- In
BitVec.c:573
:
}
if (start2 + len > bv2->length) {
LOG_FATAL("Range [{}:{}] exceeds bitvector2 length {}", start2, LVAL(start2 + len - 1), bv2->length);
}
#include <stdio.h>
#include <Misra/Types.h> // For LVAL macro
// Include test utilities
- In
Vec.Insert.c:5
:
#include <stdio.h>
#include <string.h>
#include <Misra/Types.h> // For LVAL macro
// Include test utilities
- In
Vec.Insert.c:316
:
// Test R-value insert operations
VecPushBackR(&vec, LVAL(42));
// Check that the element was added
- In
Vec.Insert.c:329
:
// Test R-value insert at index
VecInsertR(&vec, LVAL(50), 1);
// Check that the element was inserted
- In
Vec.Insert.c:349
:
// Test R-value fast insert
VecInsertFastR(&vec, LVAL(60), 1);
// Check that the element was inserted
- In
Vec.Complex.c:6
:
#include <stdio.h>
#include <stdlib.h>
#include <Misra/Types.h> // For LVAL macro
// Include test utilities
#include <stdio.h>
#include <Misra/Types.h> // For LVAL macro
// Include test utilities
- In
Vec.Remove.c:5
:
#include <stdio.h>
#include <Misra/Types.h> // For LVAL macro
// Include test utilities for deadend testing
#include <Misra/Std/Log.h>
#include <stdio.h>
#include <Misra/Types.h> // For LVAL macro
// Include test utilities
- In
Vec.Init.c:6
:
#include <stdio.h>
#include <string.h>
#include <Misra/Types.h> // For LVAL macro
// Include test utilities
#include <Misra/Std/Io.h>
#include <stdio.h>
#include <Misra/Types.h> // For LVAL macro
// Include test utilities
- In
Vec.Ops.c:4
:
#include <Misra/Std/Log.h>
#include <stdio.h>
#include <Misra/Types.h> // For LVAL macro
// Include test utilities