Grupos de Google ya no admite nuevas publicaciones ni suscripciones de Usenet. El contenido anterior sigue siendo visible.

Specifying standard headers that don't require run time support

Visto 450 veces
Saltar al primer mensaje no leído

Ian Collins

no leída,
5 ene 2016, 14:20:105/1/16
a

Hello,

Has there ever been a move to formally identify standard library
headers that don't require run time (especially dynamic allocation)
support? An obvious example would be <array>.

The reason I ask is to make at least a subset of the standard library
available to smaller embedded projects.



--
Ian Collins


[ comp.std.c++ is moderated. To submit articles, try posting with your ]
[ newsreader. If that fails, use mailto:std-cpp...@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Martin Bonner

no leída,
15 ene 2016, 14:10:0815/1/16
a

On Tuesday, 5 January 2016 20:20:10 UTC+1, Ian Collins wrote:
> Hello,
>
> Has there ever been a move to formally identify standard library
> headers that don't require run time (especially dynamic allocation)
> support? An obvious example would be <array>.
>
> The reason I ask is to make at least a subset of the standard library
> available to smaller embedded projects.


I don't think so. It seems like a useful exercise if you want to start.

Expect arguments about whether "exceptions" require run-time support.

Expect arguments about whether it means "headers that are forbidden from
requiring run-time support" or "headers that could be implemented
without using run-time support".

Perhaps "header" is too coarse a granularity?

... but, I repeat, it still sounds like a broadly worthwhile exercise.



--

Bo Persson

no leída,
15 ene 2016, 14:10:0815/1/16
a

On 2016-01-05 20:16, Ian Collins wrote:
>
>
> Hello,
>
> Has there ever been a move to formally identify standard library
> headers that don't require run time (especially dynamic allocation)
> support? An obvious example would be <array>.
>
> The reason I ask is to make at least a subset of the standard library
> available to smaller embedded projects.
> 
>
>

No, I don't think so.

The standards committee is, in general, not very fond of defining
language subsets. They strongly prefer compilers to implement the
whole language.


Bo Persson



--

Francis Glassborow

no leída,
8 feb 2016, 12:30:088/2/16
a

On 15/01/2016 19:07, Bo Persson wrote:
>
>
> On 2016-01-05 20:16, Ian Collins wrote:
>>
>>
>>
>> Hello,
>>
>> Has there ever been a move to formally identify standard library
>> headers that don't require run time (especially dynamic allocation)
>> support? An obvious example would be <array>.
>>
>> The reason I ask is to make at least a subset of the standard library
>> available to smaller embedded projects.
>> 
>>
>>
>
> No, I don't think so.
>
> The standards committee is, in general, not very fond of defining
> language subsets. They strongly prefer compilers to implement the
> whole language.
>
>
> Bo Persson
>
>
>
Yes, but I do not think this is about defining language subsets but is
more akin to the complexity guarantees. And on that line I would
prefer to see no run time support marked as a requirement where it can
be achieved.

Francis

Wouter van Ooijen

no leída,
8 feb 2016, 12:30:098/2/16
a

Op 15-Jan-16 om 8:07 PM schreef Bo Persson:
>
>
> On 2016-01-05 20:16, Ian Collins wrote:
>>
>>
>>
>> Hello,
>>
>> Has there ever been a move to formally identify standard library
>> headers that don't require run time (especially dynamic allocation)
>> support? An obvious example would be <array>.
>>
>> The reason I ask is to make at least a subset of the standard library
>> available to smaller embedded projects.
>> 
>>
>>
>
> No, I don't think so.
>
> The standards committee is, in general, not very fond of defining
> language subsets. They strongly prefer compilers to implement the
> whole language.


The question wass not about a compiler implementing a subset, but
about library functions (or headers, as groups of functions) that do
not need a particular feature that is incompatible with a specialized
use, like heap and execptions (and maybe RTTO) not being compatible
with (very) small micro-controllers.

Wouter

Ian Collins

no leída,
20 feb 2016, 16:20:0920/2/16
a

Wouter van Ooijen wrote:
>
>
> Op 15-Jan-16 om 8:07 PM schreef Bo Persson:
>>
>>
>>
>> On 2016-01-05 20:16, Ian Collins wrote:
>>>
>>>
>>>
>>>
>>> Hello,
>>>
>>> Has there ever been a move to formally identify standard library
>>> headers that don't require run time (especially dynamic allocation)
>>> support? An obvious example would be <array>.
>>>
>>> The reason I ask is to make at least a subset of the standard library
>>> available to smaller embedded projects.
>>> 
>>>
>>>
>>
>> No, I don't think so.
>>
>> The standards committee is, in general, not very fond of defining
>> language subsets. They strongly prefer compilers to implement the
>> whole language.
>
>
> The question wass not about a compiler implementing a subset, but
> about library functions (or headers, as groups of functions) that do
> not need a particular feature that is incompatible with a specialized
> use, like heap and execptions (and maybe RTTO) not being compatible
> with (very) small micro-controllers.


Not necessarily small, my application was for 32 bit ARM.

A ban on dynamic memory is usage is common in embedded systems. This
is a big niche!


--
Ian Collins

Keith Thompson

no leída,
1 abr 2016, 20:10:051/4/16
a

Ian Collins <ian-...@this.is.invalid> writes:
> Has there ever been a move to formally identify standard library
> headers that don't require run time (especially dynamic allocation)
> support? An obvious example would be <array>.
>
> The reason I ask is to make at least a subset of the standard library
> available to smaller embedded projects.

That sounds similar to the existing distinction between hosted and
freestanding implementations. C++11 17.6.1.3 [compliance] has a list of
the subset of the standard headers that must be supported for
freestanding implementations. Perhaps <array> (and others?) should be
added to that list.


--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
0 mensajes nuevos