# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # David Arroyo Menéndez , 2012. # Luis Palomo de Onis \n" "Language-Team: spanish \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: Plain text msgid "[[!meta title=\"An Introduction to GCC\"]]" msgstr "[[!meta title=\"Una Introducción a GCC\"]]" #. type: include #, no-wrap msgid "config-local.texi" msgstr "config-local.texi" #. type: top #, no-wrap msgid "An Introduction to GCC" msgstr "Una Introducci@'on a GCC" #. type: subtitle #, no-wrap msgid "for the GNU Compilers @code{gcc} and @code{g++}" msgstr "para los Compiladores de GNU @code{gcc} y @code{g++}" #. type: subtitle #, no-wrap msgid "Revised and updated" msgstr "Revisado y actualizado" #. type: author #, no-wrap msgid "Brian Gough" msgstr "Brian Gough" #. type: author #, no-wrap msgid "Foreword by Richard M.@: Stallman" msgstr "Prefacio por Richard M.@: Stallman" #. type: flushleft #, no-wrap msgid "" "A catalogue record for this book is available from the British Library.\n" "\n" msgstr "" "\n" "El registro de este libro est@'a disponible en la Biblioteca Brit@'anica.\n" #. type: flushleft #, no-wrap msgid "" "Second printing, August 2005 (1/8/2005). Revised and updated.\n" "First printing, March 2004 (7/3/2004).\n" "\n" msgstr "" "\n" "Segunda impresi@'on, Agosto 2005 (1/8/2005). Revisado y actualizado.\n" "Primera impresi@'on, Marzo 2004 (7/3/2004).\n" "Traducido por David Arroyo Men@'endez y Luis Palomo de On@'{@dotless{i}}s Guti@'errez,\n" "Agosto 2011 (10/8/2011). Revisado y actualizado (gcc 4.6)." #. type: flushleft #, no-wrap msgid "" "Published by Network Theory Limited.\n" "\n" msgstr "\nPublicado por Network Theory Limited." #. type: flushleft #, no-wrap msgid "" "15 Royal Park\n" "Bristol \n" "BS8 3AL\n" "United Kingdom\n" "\n" msgstr "" "15 Royal Park\n" "Bristol\n" "BS8 3AL\n" "United Kingdom\n" #. type: flushleft #, no-wrap msgid "" "Email: info@@network-theory.co.uk\n" "\n" msgstr "" "\n" "Correo electr@'onico: info@@network-theory.co.uk\n" "\n" #. type: flushleft #, no-wrap msgid "" "ISBN 0-9541617-9-3\n" "\n" msgstr "ISBN 0-9541617-9-3\n" #. type: flushleft #, no-wrap msgid "" "Further information about this book is available from \n" "@uref{http://www.network-theory.co.uk/gcc/intro/}\n" msgstr "" "\n" "Hay m@'as informaci@'on de este libro disponible desde \n" "@uref{http://www.network-theory.co.uk/gcc/intro/}\n" #. type: ifset msgid "" "Cover Image: From a layout of a fast, energy-efficient hardware stack." "@footnote{``A Fast and Energy-Efficient Stack'' by J.@: Ebergen, D.@: " "Finchelstein, R.@: Kao, J.@: Lexau and R.@: Hopkins.} Image created with the " "free Electric VLSI design system by Steven Rubin of Static Free Software " "(@uref{http://www.staticfreesoft.com/,,www.staticfreesoft.com}). Static " "Free Software provides support for Electric to the electronics design " "industry." msgstr "" "Imagen de cubierta: Del dise@~no de una pila de hardware \n" "r@'apida y eficiente energ@'eticamente.@footnote{``A Fast \n" "and Energy-Efficient Stack'' por J.@: Ebergen, D.@: \n" "Finchelstein, R.@: Kao, J.@: Lexau y R.@: Hopkins.} \n" "Imagen creada con el sistema de dise@~no libre Electric \n" "VLSI escrito por Steven Rubin de Static Free Software \n" "(@uref{http://www.staticfreesoft.com/,,www.staticfreesoft.com}). \n" "Static Free Software proporciona soporte para Electric en la \n" "industria del dise@~no electr@'onico" #. type: titlepage msgid "Copyright @copyright{} 2004, 2005 Network Theory Ltd." msgstr "Copyright @copyright{} 2004, 2005 Network Theory Ltd." #. type: titlepage msgid "" "Permission is granted to copy, distribute and/or modify this document under " "the terms of the GNU Free Documentation License, Version 1.2 or any later " "version published by the Free Software Foundation; with no Invariant " "Sections, with the Front-Cover Texts being ``A Network Theory Manual'', and " "with the Back-Cover Texts as in (a) below. A copy of the license is " "included in the section entitled ``GNU Free Documentation License''." msgstr "" "Se permite la copia, distribuci@'on y/o modificaci@'on de este\n" "documento bajo los t@'erminos de la Licencia de Documentaci@'on Libre\n" "de GNU, Versi@'on 1.2 o cualquier versi@'on posterior publicada por\n" "la Free Software Foundation; sin Secciones Invariantes, con el Texto\n" "de Portada diciendo ``Un Manual de Network Theory'', y con el Texto de\n" "Contraportada como en (a). Una copia de la licencia est@'a incluida\n" "en la secci@'on titulada ``GNU Free Documentation License''." #. type: titlepage msgid "" "(a) The Back-Cover Text is: ``The development of this manual was funded " "entirely by Network Theory Ltd. Copies published by Network Theory Ltd " "raise money for more free documentation.''" msgstr "" "(a) El Texto de Contraportada es: ``El desarrollo de este manual fu@'e\n" "realizado enteramente por Network Theory Ltd. Las copias publicadas por\n" "Network Theory Ltd traer@'an dinero para m@'as documentaci@'on libre.''" #. type: ifset msgid "" "The Texinfo source for this manual may be obtained from: @* @code{http://www." "network-theory.co.uk/gcc/intro/src/}" msgstr "" "Las fuentes en Texinfo para este manual pueden ser obtenidas de @* \n" "@code{http://www.network-theory.co.uk/gcc/intro/src/}" #. type: node #, no-wrap msgid "Top" msgstr "Top" #. type: Plain text msgid "" "This manual provides an introduction to the GNU C and C++ Compilers, @code" "{gcc} and @code{g++}, which are part of the GNU Compiler Collection (GCC)." msgstr "" "Este manual proporciona una introducci@'on a los Compiladores de GNU\n" "de C y C++, @code{gcc} y @code{g++}, que son parte de la Colecci@'on\n" "de Compiladores de GNU (GCC). " #. type: Plain text msgid "" "The development of this manual was funded entirely by @uref{http://www." "network-theory.co.uk/,Network Theory Ltd}. Copies published by Network " "Theory Ltd raise money for more free documentation." msgstr "" "\n" "El desarrollo de este manual fu@'e realizado enteramente por \n" "@uref{http://www.network-theory.co.uk/,Network Theory Ltd}. Las copias\n" "publicadas por Network Theory Ltd traer@'an dinero para m@'as " "documentaci@'on libre." #. type: menuentry msgid "Foreword::" msgstr "Prefacio::" #. type: chapter #, no-wrap msgid "Introduction" msgstr "Introducci@'on" #. type: chapter #, no-wrap msgid "Compiling a C program" msgstr "Compilando un programa C" #. type: chapter #, no-wrap msgid "Compilation options" msgstr "Opciones de compilaci@'on" #. type: chapter #, no-wrap msgid "Using the preprocessor" msgstr "Usando el preprocesador" #. type: chapter #, no-wrap msgid "Compiling for debugging" msgstr "Compilando para depuraci@'on" #. type: chapter #, no-wrap msgid "Compiling with optimization" msgstr "Compilando con optimizaci@'on" #. type: chapter #, no-wrap msgid "Compiling a C++ program" msgstr "Compilando un programa C++" #. type: chapter #, no-wrap msgid "Platform-specific options" msgstr "Opciones espec@'{@dotless{i}}ficas de plataforma" #. type: chapter #, no-wrap msgid "Troubleshooting" msgstr "Resoluci@'on de problemas" #. type: chapter #, no-wrap msgid "Compiler-related tools" msgstr "Utilidades relativas al compilador" #. type: chapter #, no-wrap msgid "How the compiler works" msgstr "Como funciona el compilador" #. type: chapter #, no-wrap msgid "Examining compiled files" msgstr "Examinado archivos compilados" #. type: chapter #, no-wrap msgid "Common error messages" msgstr "Mensajes comunes de error" #. type: chapter #, no-wrap msgid "Getting help" msgstr "Obteniendo ayuda" #. type: unnumbered #, no-wrap msgid "Further reading" msgstr "Lectura adicional" #. type: unnumbered #, no-wrap msgid "Acknowledgements" msgstr "Reconocimientos" #. type: unnumbered #, no-wrap msgid "Free software organizations" msgstr "Organizaciones de software libre" #. type: unnumbered #, no-wrap msgid "Index" msgstr "@'Indice" #. type: unnumbered #, no-wrap msgid "Foreword" msgstr "Prefacio" #. type: i{#1} msgid "" "This foreword has been kindly contributed by Richard M.@: Stallman, the " "principal author of GCC and founder of the GNU Project." msgstr "" "Este Prefacio es una amable contribuci@'on de Richard M. Stallman, el\n" "principal autor de GCC y fundador del Proyecto GNU." #. type: ifnotinfo msgid "" "This book is a guide to getting started with GCC, the GNU Compiler " "Collection. It will tell you how to use GCC as a programming tool. GCC is " "a programming tool, that's true---but it is also something more. It is part " "of a 20-year campaign for freedom for computer users." msgstr "" "Este libro es una gu@'{@dotless{i}}a para iniciarse en GCC, GNU\n" "Compiler Collection (Colecci@'on de Compiladores GNU). Se\n" "mostrar@'a c@'omo usar GCC como una herramienta de programaci@'on. GCC\n" "es una herramienta de programaci@'on, esto es verdad--- pero tambi@'en\n" "es algo m@'as. Tambi@'en forma parte de la campa@~na por la libertad\n" "de los usuarios de ordenadores desde hace m@'as de 20 a@~nos." #. type: ifnotinfo msgid "" "We all want good software, but what does it mean for software to be " "``good''? Convenient features and reliability are what it means to be @emph" "{technically} good, but that is not enough. Good software must also be @emph" "{ethically} good: it has to respect the users' freedom." msgstr "" "Todo lo que queremos es buen software, pero @questiondown{}qu@'e\n" "significa para nosotros que un software sea bueno?. Funcionalidades\n" "adecuadas y fiabilidad puede ser algo @emph{t@'ecnicamente} bueno,\n" "pero esto no es suficiente. Un buen software debe adem@'as ser\n" "@emph{@'eticamente} bueno: tiene que ser respetuoso con la libertad de\n" "los usuarios." #. type: ifnotinfo msgid "" "As a user of software, you should have the right to run it as you see fit, " "the right to study the source code and then change it as you see fit, the " "right to redistribute copies of it to others, and the right to publish a " "modified version so that you can contribute to building the community. When " "a program respects your freedom in this way, we call it @dfn{free " "software}. Before GCC, there were other compilers for C, Fortran, Ada, " "etc. But they were not free software; you could not use them in freedom. I " "wrote GCC so we could use a compiler without giving up our freedom." msgstr "" "Como usuario de software, se deber@'{@dotless{i}}a tener el derecho a\n" "ejecutarlo como se necesite, el derecho a estudiar el c@'odigo fuente\n" "y a cambiarlo como se desee, el derecho a redistribuir copias de\n" "@'este a terceras personas, y el derecho a publicar versiones\n" "modificadas con lo que se puede contribuir a la construcci@'on de la\n" "comunidad. Cuando un programa respeta la libertad de esta forma, se\n" "dice que es @dfn{software libre}. Anteriormente a GCC\n" "hab@'{@dotless{i}}a otros compiladores para C, Fortran, Ada, etc. Pero\n" "no eran software libre, y no se pod@'{@dotless{i}}an usar\n" "libremente. Escrib@'{@dotless{i}} el GCC para que se pueda usar un\n" "compilador sin perder nuestra libertad." #. type: ifnotinfo msgid "" "A compiler alone is not enough---to use a computer system, you need a whole " "operating system. In 1983, all operating systems for modern computers were " "non-free. To remedy this, in 1984 I began developing the GNU operating " "system, a Unix-like system that would be free software. Developing GCC was " "one part of developing GNU." msgstr "" "Un compilador solo no es suficiente ---para usar un sistema de\n" "computaci@'on, se debe disponer de un sistema operativo completo. En\n" "1983, todos los sistemas operativos para ordenadores modernos eran no\n" "libres. Para remediar esto, en 1984 comenc@'e a desarrollar el sistema\n" "operativo GNU, un sistema similiar a Unix que ser@'{@dotless{i}}a\n" "software libre. El desarrollo de GCC fu@'e una parte del desarrollo de\n" "GNU." #. type: ifnotinfo msgid "" "By the early 90s, the nearly-finished GNU operating system was completed by " "the addition of a kernel, Linux, that became free software in 1992. The " "combined GNU/Linux operating system has achieved the goal of making it " "possible to use a computer in freedom. But freedom is never automatically " "secure, and we need to work to defend it. The Free Software Movement needs " "your support." msgstr "" "A principios de los 90, el reci@'en terminado sistema operativo GNU\n" "fu@'e completado con la suma de un kernel, Linux, que se hizo software\n" "libre en 1992. El sistema operativo combinado GNU/Linux ha alcanzado\n" "la meta de hacer posible el uso de una computadora en libertad. Pero\n" "la libertad nunca est@'a autom@'aticamente asegurada, y debemos\n" "trabajar para protegerla. El Movimiento del Software Libre necesita tu\n" "apoyo." #. type: flushright #, no-wrap msgid "" "Richard M.@: Stallman\n" "February 2004\n" msgstr "" "Richard M.@: Stallman\n" "Febrero de 2004\n" #. type: Plain text msgid "" "The purpose of this book is to explain the use of the GNU C and C++ " "compilers, @code{gcc} and @code{g++}. After reading this book you should " "understand how to compile a program, and how to use basic compiler options " "for optimization and debugging. This book does not attempt to teach the C " "or C++ languages themselves, since this material can be found in many other " "places (@pxref{Further reading})." msgstr "" "El prop@'osito de este libro es explicar el uso de los compiladores de \n" "GNU C y C++, @code{gcc} y @code{g++}. Despu@'es de leer este libro se \n" "comprender@'a como compilar un programa y, c@'omo usar las opciones \n" "b@'asicas del compilador para optimizaci@'on y depuraci@'on. Este libro \n" "no intenta ense@~nar los lenguajes C o C++ en s@'{@dotless{i}}, este \n" "material puede ser encontrado en muchos otros lugares \n" "(@pxref{Lectura adicional})." #. type: Plain text msgid "" "Experienced programmers who are familiar with other systems, but new to the " "GNU compilers, can skip the early sections of the chapters ``@cite{Compiling " "a C program}'', ``@cite{Using the preprocessor}'' and ``@cite{Compiling a C+" "+ program}''. The remaining sections and chapters should provide a good " "overview of the features of GCC for those already know how to use other " "compilers." msgstr "" "Los programadores experimentados que est@'an familiarizados con otros\n" "sistemas, pero son nuevos en compiladores GNU, pueden saltarse las\n" "primeras secciones de los cap@'{@dotless{i}}tulos ``@cite{Compilando\n" "un programa C}'', ``@cite{Usando el preprocesador}'' y\n" "``@cite{Compilando un programa C++}''. Las secciones y\n" "cap@'{@dotless{i}}tulos restantes proporcionan una buena visi@'on del\n" "conjunto de las funcionalidades de GCC para aquellos que ya saben\n" "c@'omo usar otros compiladores." #. type: section #, no-wrap msgid "A brief history of GCC" msgstr "Una breve historia de GCC" #. type: section #, no-wrap msgid "Major features of GCC" msgstr "Importantes caracter@'{@dotless{i}}sticas de GCC" #. type: section #, no-wrap msgid "Programming in C and C++" msgstr "Programaci@'on en C y C++" #. type: section #, no-wrap msgid "Conventions used in this manual" msgstr "Convenciones usadas en este manual" #. type: cindex #, no-wrap msgid "@code{gcc}, GNU C Compiler" msgstr "@code{gcc}, GNU C Compiler" #. type: cindex #, no-wrap msgid "C, @code{gcc} compiler" msgstr "C, compilador @code{gcc}" #. type: cindex #, no-wrap msgid "history, of GCC" msgstr "historia, de GCC" #. type: cindex #, no-wrap msgid "Richard Stallman, principal author of GCC" msgstr "Richard Stallman, principal autor de GCC" #. type: cindex #, no-wrap msgid "GNU Project, history of" msgstr "Proyecto GNU, historia de" #. type: cindex #, no-wrap msgid "Free Software Foundation (FSF)" msgstr "Free Software Foundation (FSF)" #. type: Plain text msgid "" "The original author of the GNU C Compiler (GCC) is Richard Stallman, the " "founder of the GNU Project." msgstr "" "\n" "El autor original del Compilador de C de GNU (GCC) es Richard Stallman, el \n" "fundador del Proyecto GNU." #. type: Plain text msgid "" "The GNU Project was started in 1984 to create a complete Unix-like operating " "system as free software, in order to promote freedom and cooperation among " "computer users and programmers. Every Unix-like operating system needs a C " "compiler, and as there were no free compilers in existence at that time, the " "GNU Project had to develop one from scratch. The work was funded by " "donations from individuals and companies to the Free Software Foundation, a " "non-profit organization set up to support the work of the GNU Project." msgstr "" "El Proyecto GNU fu@'e iniciado en 1984 para crear un sistema operativo " "basado \n" "en software libre similar a UNIX y, as@'{@dotless{i}} promover la libertad y " "la cooperaci@'on \n" "entre usarios de ordenadores y programadores. Cualquier sistema operativo " "basado \n" "en UNIX necesita un compilador de C, y no hab@'{@dotless{i}}a compiladores " "libres en ese\n" "momento, el Proyecto GNU deb@'{@dotless{i}}a desarrollar uno desde cero. " "Este trabajo fu@'e \n" "financiado por donaciones de individuos y compa@~nias a trav@'es de la \n" "Free Software Foundation, una organizaci@'on sin @'animo de lucro\n" "destinada a dar soporte al trabajo del Proyecto GNU." #. type: Plain text msgid "" "The first release of GCC was made in 1987. This was a significant " "breakthrough, being the first portable ANSI C optimizing compiler released " "as free software. Since that time GCC has become one of the most important " "tools in the development of free software." msgstr "" "\n" "La primera entrega de GCC fu@'e hecha en 1987. Esto fu@'e un significativo \n" "progreso, siendo el primer compilador portable para optimizar ANSI C " "liberado \n" "como software libre. Desde este momento GCC ha llegado a ser uno de las " "m@'as \n" "importantes herramientas en el desarrollo de software libre." #. type: cindex #, no-wrap msgid "C++, @code{g++} compiler" msgstr "C++, compilador @code{g++}" #. type: cindex #, no-wrap msgid "@code{g++}, GNU C++ Compiler" msgstr "@code{g++}, GNU C++ Compiler" #. type: cindex #, no-wrap msgid "EGCS (Experimental GNU Compiler Suite)" msgstr "EGCS (Experimental GNU Compiler Suite)" #. type: Plain text msgid "" "A major revision of the compiler came with the 2.0 series in 1992, which " "added the ability to compile C++. In 1997 an experimental branch of the " "compiler (EGCS) was created, to improve optimization and C++ support. " "Following this work, EGCS was adopted as the new main-line of GCC " "development, and these features became widely available in the 3.0 release " "of GCC in 2001." msgstr "" "Un avance importante en el compilador llega con la serie 2.0 en 1992,\n" "que a@~nade la capacidad de compilar C++. En 1997, se cre@'o una rama\n" "experimental del compilador (EGCS) para mejorar la optimizaci@'on y el\n" "soporte de C++. Despu@'es de este trabajo, EGCS fu@'e adoptado como la\n" "principal l@'{@dotless{i}}nea de desarrollo de GCC y, estas\n" "funcionalidades llegaron a estar ampliamente disponibles en la\n" "versi@'on 3.0 de GCC en 2001. " #. type: cindex #, no-wrap msgid "Fortran, @code{g77} compiler" msgstr "Fortran, compilador @code{g77}" #. type: cindex #, no-wrap msgid "Objective-C" msgstr "Objective-C" #. type: cindex #, no-wrap msgid "ADA, @code{gnat} compiler" msgstr "ADA, compilador @code{gnat}" #. type: cindex #, no-wrap msgid "Java, @code{gcj} compiler" msgstr "Java, compilador @code{gcj}" #. type: cindex #, no-wrap msgid "@code{g77}, Fortran compiler" msgstr "@code{g77}, compilador de Fortran" #. type: cindex #, no-wrap msgid "@code{gnat}, GNU ADA compiler" msgstr "@code{gnat}, compilador GNU de ADA" #. type: cindex #, no-wrap msgid "@code{gcj}, GNU Compiler for Java" msgstr "@code{gcj}, GNU Compiler for Java" #. type: Plain text msgid "" "Over time GCC has been extended to support many additional languages, " "including Fortran, ADA, Java and Objective-C. The acronym GCC is now used " "to refer to the ``GNU Compiler Collection''. Its development is guided by " "the @dfn{GCC Steering Committee}, a group composed of representatives from " "GCC user communities in industry, research and academia." msgstr "" "\n" "A trav@'es del tiempo GCC ha sido extendido para dar soporte a muchos \n" "lenguajes adicionales, incluyendo Fortran, ADA, Java y Objective-C. El \n" "acr@'onimo GCC es ahora usado para referir al ``GNU Compiler Collection'' \n" "(Colecci@'on de Compiladores de GNU). Su desarrollo est@'a guiado por el \n" "@dfn{GCC Steering Committee}, un grupo compuesto de representantes de las \n" "comunidades de usuarios/as de GCC en la industria, la investigaci@'on y \n" "la academia." #. type: cindex #, no-wrap msgid "features, of GCC" msgstr "funcionalidades, de GCC" #. type: cindex #, no-wrap msgid "major features, of GCC" msgstr "principales funcionalidades, de GCC" #. type: cindex #, no-wrap msgid "GNU Compilers, major features" msgstr "Compiladores de GNU, principales funcionalidades" #. type: Plain text msgid "This section describes some of the most important features of GCC." msgstr "" "Esta secci@'on describe algunas de las m@'as importantes funcionalidades de " "GCC." #. type: Plain text msgid "" "First of all, GCC is a portable compiler---it runs on most platforms " "available today, and can produce output for many types of processors. In " "addition to the processors used in personal computers, it also supports " "microcontrollers, DSPs and 64-bit CPUs." msgstr "" "Lo primero de todo, GCC es un compilador portable ---se ejecuta en la\n" "mayor@'{@dotless{i}}a de las plataformas disponibles hoy, y puede\n" "producir salidas para muchos tipos de procesadores. Adem@'as de\n" "procesadores usados en ordenadores personales, tambi@'en soporta\n" "microcontroladores, DSPs y CPUs de 64 bits. " #. type: cindex #, no-wrap msgid "embedded systems, cross-compilation for" msgstr "sistemas embebido, para compilaci@'on cruzada" #. type: Plain text msgid "" "GCC is not only a native compiler---it can also @dfn{cross-compile} any " "program, producing executable files for a different system from the one used " "by GCC itself. This allows software to be compiled for embedded systems " "which are not capable of running a compiler. GCC is written in C with a " "strong focus on portability, and can compile itself, so it can be adapted to " "new systems easily." msgstr "" "GCC no es solo un compilador nativo ---tambi@'en puede @dfn{compilar\n" "cruzado} cualquier programa, produciendo ficheros ejecutables para un\n" "sistema diferente desde el que GCC est@'a siendo usado. Esto permite\n" "compilar software para sistemas embebidos que no son capaces de\n" "ejecutar un compilador. GCC est@'a escrito en C con un fuerte enfoque\n" "hacia la portabilidad, y puede compilarse a s@'{@dotless{i}} mismo,\n" "as@'{@dotless{i}} puede ser adaptado a nuevos sistemas f@'acilmente." #. type: Plain text msgid "" "GCC has multiple language @dfn{frontends}, for parsing different languages. " "Programs in each language can be compiled, or cross-compiled, for any " "architecture. For example, an ADA program can be compiled for a " "microcontroller, or a C program for a supercomputer." msgstr "" "\n" "GCC tiene m@'ultiples @dfn{frontends}, para parsear diferentes lenguajes. \n" "Los programas en cada lenguaje pueden ser compilados, o compilados de \n" "manera cruzada, para cualquier arquitectura. Por ejemplo, un programa en \n" "ADA puede ser compilado para un microcontrolador, o un programa en C \n" "para un supercomputador." #. type: Plain text msgid "" "GCC has a modular design, allowing support for new languages and " "architectures to be added. Adding a new language front-end to GCC enables " "the use of that language on any architecture, provided that the necessary " "run-time facilities (such as libraries) are available. Similarly, adding " "support for a new architecture makes it available to all languages." msgstr "" "GCC tiene un dise@~no modular, permitiendo que el soporte para nuevos \n" "lenguajes y arquitecturas sea a@~nadido. A@~nadir un nuevo front-end a \n" "GCC habilita el uso de este lenguaje en cualquier arquitectura y \n" "proporciona que est@'en disponibles facilidades (tales como\n" "librer@'{@dotless{i}}as) en tiempo de ejecuci@'on. De manera similar,\n" "si se a@~nade soporte para una nueva arquitectura @'este se vuelve\n" "disponible para todos los lenguajes." #. type: Plain text msgid "" "Finally, and most importantly, GCC is free software, distributed under the " "GNU General Public License (GNU GPL).@footnote{For details see the license " "file @file{COPYING} distributed with GCC.} This means you have the freedom " "to use and to modify GCC, as with all GNU software. If you need support for " "a new type of CPU, a new language, or a new feature you can add it yourself, " "or hire someone to enhance GCC for you. You can hire someone to fix a bug " "if it is important for your work." msgstr "" "Finalmente, y de manera m@'as importante, GCC es software libre, \n" "distribuido bajo la GNU General Public License (GNU GPL).@footnote{Para \n" "detalles ver el fichero de licencia @file{COPYING} distribuido con GCC.} \n" "Esto significa que se tiene la libertad para usar y modificar GCC, como \n" "con todo el software de GNU. Si se necesita soporte para un nuevo tipo \n" "de CPU, un nuevo lenguaje, o una nueva funcionalidad es posible \n" "a@~nadirla uno mismo o contratar a alguien para mejorar GCC de manera \n" "personalizada. Se puede contratar a alguien para arreglar un error si \n" "esto es importante en el trabajo cotidiano." #. type: Plain text msgid "" "Furthermore, you have the freedom to share any enhancements you make to " "GCC. As a result of this freedom you can also make use of enhancements to " "GCC developed by others. The many features offered by GCC today show how " "this freedom to cooperate works to benefit you, and everyone else who uses " "GCC." msgstr "" "M@'as all@'a, hay libertad para compartir cualquier mejora hecha a GCC. \n" "Como resultado de esta libertad, se pueden usar las mejoras hechas a GCC \n" "por otras personas. Las muchas funcionalidades ofrecidas por GCC hoy " "muestran \n" "c@'omo esta libertad de cooperar funciona en tu beneficio, y en el de \n" "cualquiera que use GCC." #. type: cindex #, no-wrap msgid "Lisp, compared with C/C++" msgstr "Lisp, comparado con C/C++" #. type: cindex #, no-wrap msgid "Smalltalk, compared with C/C++" msgstr "Smalltalk, comparado con C/C++" #. type: cindex #, no-wrap msgid "Scheme, compared with C/C++" msgstr "Scheme, comparado con C/C++" #. type: cindex #, no-wrap msgid "Java, compared with C/C++" msgstr "Java, comparado con C/C++" #. type: cindex #, no-wrap msgid "C/C++, risks of using" msgstr "C/C++, riesgos de uso" #. type: cindex #, no-wrap msgid "risks, examples of" msgstr "riesgos, ejemplos de" #. type: Plain text msgid "" "C and C++ are languages that allow direct access to the computer's memory. " "Historically, they have been used for writing low-level systems software, " "and applications where high-performance or control over resource usage are " "critical. However, great care is required to ensure that memory is accessed " "correctly, to avoid corrupting other data-structures. This book describes " "techniques that will help in detecting potential errors during compilation, " "but the risk in using languages like C or C++ can never be eliminated." msgstr "" "C y C++ son lenguajes que permiten acceso directo a la memoria del " "ordenador. \n" "Hist@'oricamente, han sido usados para escribir sistemas software de bajo " "nivel, \n" "y aplicaciones d@'onde el alto rendimiento o el control a trav@'es del uso " "de \n" "recursos son cr@'{@dotless{i}}ticos. Sin embargo, se requiere de gran " "cuidado para asegurar \n" "que la memoria es accedida de manera correcta, para evitar la corrupci@'on " "de \n" "otras estructuras de datos. Este libro describe t@'ecnicas que ayudar@'an " "a \n" "detectar potenciales errores durante la compilaci@'on, pero los riesgos de " "usar \n" "lenguajes como C o C++ nunca pueden ser eliminados." #. type: Plain text msgid "" "In addition to C and C++ the GNU Project also provides other high-level " "languages, such as GNU Common Lisp (@code{gcl}), GNU Smalltalk (@code{gst}), " "the GNU Scheme extension language (@code{guile}) and the GNU Compiler for " "Java (@code{gcj}). These languages do not allow the user to access memory " "directly, eliminating the possibility of memory access errors. They are a " "safer alternative to C and C++ for many applications." msgstr "" "Adem@'as de C y C++ el Proyecto GNU tambi@'en proporciona otros lenguajes \n" "de alto nivel, tales como GNU Common Lisp (@code{gcl}), GNU Smalltalk \n" "(@code{gst}), el GNU Scheme extension language (@code{guile}) y el GNU\n" "Compiler para Java (@code{gcj}). Estos lenguajes no permiten al\n" "usuario acceder a memoria directamente, eliminando la posibilidad de\n" "errores de acceso a memoria. Son una alternativa segura a C y C++ para\n" "muchas aplicaciones." #. type: cindex #, no-wrap msgid "conventions, used in manual" msgstr "convenciones, usadas en manual" #. type: cindex #, no-wrap msgid "examples, conventions used in" msgstr "ejemplos, convenciones usadas" #. type: cindex #, no-wrap msgid "shell prompt" msgstr "prompt de shell" #. type: cindex #, no-wrap msgid "@code{$}, shell prompt" msgstr "@code{$}, prompt de shell" #. type: Plain text msgid "" "This manual contains many examples which can be typed at the keyboard. A " "command entered at the terminal is shown like this," msgstr "" "\n" "Este manual contiene muchos ejemplos que pueden ser escritos en el " "teclado. \n" "Un comando introducido en el terminal se muestra como esto," #. type: example #, no-wrap msgid "$ @i{command}\n" msgstr "$ @i{comando}\n" #. type: Plain text msgid "followed by its output. For example:" msgstr "seguido por su salida. Por ejemplo:" #. type: example #, no-wrap msgid "" "$ echo \"hello world\"\n" "hello world\n" msgstr "" "$ echo \"hola mundo\"\n" "hola mundo\n" #. type: cindex #, no-wrap msgid "dollar sign @code{$}, shell prompt" msgstr "signo del d@'olar @code{$}, shell prompt" #. type: Plain text msgid "" "The first character on the line is the terminal prompt, and should not be " "typed. The dollar sign @samp{$} is used as the standard prompt in this " "manual, although some systems may use a different character." msgstr "" "\n" "El primer car@'acter en la l@'{@dotless{i}}nea es el prompt del terminal, y " "no ser@'a \n" "escrito. El signo del d@'olar @samp{$} es usado como el prompt est@'andar \n" "en este manual, aunque en algunos sistemas puede usar un car@'acter " "diferente." #. type: Plain text msgid "" "When a command in an example is too long to fit in a single line it is " "wrapped and then indented on subsequent lines, like this:" msgstr "" "Cuando un comando en un ejemplo es demasiado largo para ajustarse en una \n" "sola l@'{@dotless{i}}nea es envuelto e indentado en las l@'{@dotless{i}}neas " "subsiguientes, como \n" "este:" #. type: example #, no-wrap msgid "" "$ echo \"an example of a line which is too long to fit \n" " in this manual\"\n" msgstr "" "$ echo \"un ejemplo de una l@'{@dotless{i}}nea que es demasiado \n" " larga para este manual\"\n" #. type: Plain text msgid "" "When entered at the keyboard, the entire command should be typed on a single " "line." msgstr "" "Cuando se introduce en el teclado, el comando entero ser@'a escrito en una \n" "sola l@'{@dotless{i}}nea." #. type: Plain text msgid "" "The example source files used in this manual can be downloaded from the " "publisher's website,@footnote{See @uref{http://www.network-theory.co.uk/gcc/" "intro/}} or entered by hand using any text editor, such as the standard GNU " "editor, @code{emacs}. The example compilation commands use @code{gcc} and " "@code{g++} as the names of the GNU C and C++ compilers, and @code{cc} to " "refer to other compilers. The example programs should work with any version " "of GCC. Any command-line options which are only available in recent " "versions of GCC are noted in the text." msgstr "" "Los ficheros fuente de ejemplo usados en este manual pueden ser " "descargados \n" "desde el sitio web de la editorial,@footnote{Ver \n" "@uref{http://www.network-theory.co.uk/gcc/intro/}} o introducidos a mano \n" "usando cualquier editor de texto, tal como el editor est@'andar de GNU, \n" "@code{emacs}. Los comandos de compilaci@'on de ejemplo usan @code{gcc} y \n" "@code{g++} como los nombres de los compiladores de GNU de C y de C++ y " "usan \n" "@code{cc} para referirse a otros compiladores. Los programas de ejemplo \n" "trabajar@'an con cualquier versi@'on de GCC. Las opciones de estos " "comandos \n" "que est@'an disponibles en versiones recientes de GCC son anotadas en el " "texto." #. type: cindex #, no-wrap msgid "shell variables" msgstr "variables de shell" #. type: cindex #, no-wrap msgid "environment variables" msgstr "variables de entorno" #. type: Plain text msgid "" "The examples assume the use of a GNU operating system---there may be minor " "differences in the output on other systems. Some non-essential and verbose " "system-dependent output messages (such as very long system paths) have been " "edited in the examples for brevity. The commands for setting environment " "variables use the syntax of the standard GNU shell (@code{bash}), and should " "work with any version of the Bourne shell." msgstr "" "Este ejemplo asume el uso de un sistema operativo GNU ---hay\n" "peque@~nas diferencias en la salida en otros sistemas. Algunos\n" "mensajes de salida no esenciales y dependientes del sistema (tal como\n" "rutas muy largas) han sido editadas en los ejemplos por brevedad. Los\n" "comandos para configurar variables de entorno usan la sintaxis de la\n" "shell est@'andar de GNU (@code{bash}), y funcionar@'a con cualquier\n" "versi@'on de Bourne shell. " #. type: cindex #, no-wrap msgid "compiling C programs with @code{gcc}" msgstr "compilando programas C con @code{gcc}" #. type: Plain text msgid "" "This chapter describes how to compile C programs using @code{gcc}. Programs " "can be compiled from a single source file or from multiple source files, and " "may use system libraries and header files." msgstr "" "Este cap@'{@dotless{i}}tulo describe c@'omo compilar programas C usando @code" "{gcc}. \n" "Los programas pueden ser compilados desde un solo fichero fuente o \n" "desde m@'ultiples ficheros fuente, y pueden usar librer@'{@dotless{i}}as de " "sistema \n" "y ficheros de cabecera." #. type: cindex #, no-wrap msgid "source code" msgstr "c@'odigo fuente" #. type: cindex #, no-wrap msgid "machine code" msgstr "c@'odigo m@'aquina" #. type: cindex #, no-wrap msgid "executable file" msgstr "fichero ejecutable" #. type: cindex #, no-wrap msgid "binary file, also called executable file" msgstr "fichero binario, tambi@'en llamado fichero ejecutable" #. type: Plain text msgid "" "Compilation refers to the process of converting a program from the textual " "@dfn{source code}, in a programming language such as C or C++, into @dfn" "{machine code}, the sequence of 1's and 0's used to control the central " "processing unit (CPU) of the computer. This machine code is then stored in " "a file known as an @dfn{executable file}, sometimes referred to as a @dfn" "{binary file}." msgstr "" "La compilaci@'on se refiere al proceso de convertir un programa desde el \n" "@dfn{c@'odigo fuente} textual de un lenguaje de programaci@'on tal como C\n" "o C++, en @dfn{c@'odigo m@'aquina}, la secuencia de unos y ceros usados \n" "para controlar la unidad central de proceso (CPU) del ordenador. Este \n" "c@'odigo m@'aquina es almacenado en un fichero conocido como @dfn{fichero \n" "ejecutable}, a veces tambi@'en llamado @dfn{fichero binario}." #. type: section #, no-wrap msgid "Compiling a simple C program" msgstr "Compilando un peque@~no programa C" #. type: section #, no-wrap msgid "Finding errors in a simple program" msgstr "Encontrando errores en un peque@~no programa" #. type: section #, no-wrap msgid "Compiling multiple source files" msgstr "Compilando m@'ultiples archivos fuentes" #. type: section #, no-wrap msgid "Compiling files independently" msgstr "Compilando archivos independientes" #. type: section #, no-wrap msgid "Recompiling and relinking" msgstr "Recompilando y reenlazando" #. type: section #, no-wrap msgid "A simple makefile" msgstr "Un peque@~no makefile" #. type: section #, no-wrap msgid "Linking with external libraries" msgstr "Enlazando con librer@'{@dotless{i}}as externas" #. type: section #, no-wrap msgid "Using library header files" msgstr "Usando librer@'{@dotless{i}}as de archivos de cabeceras" #. type: cindex #, no-wrap msgid "Hello World program, in C" msgstr "Hola Mundo, programa en C" #. type: cindex #, no-wrap msgid "C, compiling with @code{gcc}" msgstr "C, compilando con @code{gcc}" #. type: cindex #, no-wrap msgid "simple C program, compiling" msgstr "programa C simple, compilando" #. type: Plain text msgid "" "The classic example program for the C language is @dfn{Hello World}. Here " "is the source code for our version of the program:" msgstr "" "El cl@'asico programa de ejemplo para el lenguaje C es @dfn{Hola Mundo}. \n" "Aqu@'{@dotless{i}} est@'a el c@'odigo fuente para nuestra versi@'on del " "programa:" #. type: example #, no-wrap msgid "@verbatiminclude hello.c\n" msgstr "@verbatiminclude hola.es.c\n" #. type: cindex #, no-wrap msgid "@code{.c}, C source file extension" msgstr "@code{.c}, extensi@'on de fichero fuente C" #. type: cindex #, no-wrap msgid "@code{c}, C source file extension" msgstr "@code{c}, extensi@'on de fichero fuente C" #. type: cindex #, no-wrap msgid "C source file, @code{.c} extension" msgstr "fichero fuente C, extensi@'on @code{.c}" #. type: cindex #, no-wrap msgid "file extension, @code{.c} source file" msgstr "extensi@'on de fichero, fichero fuente @code{.c}" #. type: cindex #, no-wrap msgid "extension, @code{.c} source file" msgstr "extensi@'on, fichero fuente @code{.c}" #. type: Plain text msgid "" "We will assume that the source code is stored in a file called @file{hello." "c}. To compile the file @file{hello.c} with @code{gcc}, use the following " "command:" msgstr "" "Se asume que el c@'odigo fuente est@'a almacenado en un fichero \n" "llamado @file{hola.es.c}. Para compilar el fichero @file{hola.es.c} con \n" "@code{gcc}, se puede usar el siguiente comando:" #. type: example #, no-wrap msgid "$ gcc -Wall hello.c -o hello\n" msgstr "$ gcc -Wall hola.es.c -o hola\n" #. type: cindex #, no-wrap msgid "@code{gcc}, simple example" msgstr "@code{gcc}, ejemplo simple" #. type: cindex #, no-wrap msgid "@option{-o} option, set output filename" msgstr "@option{-o}, opci@'on para asignar el nombre del fichero de salida" #. type: cindex #, no-wrap msgid "@option{o} option, set output filename" msgstr "@option{o}, opci@'on para asignar el nombre del fichero de salida" #. type: cindex #, no-wrap msgid "output file option, @option{-o}" msgstr "opci@'on para asignar fichero de salida, @option{-o}" #. type: cindex #, no-wrap msgid "@code{a.out}, default executable filename" msgstr "@code{a.out}, nombre del fichero ejecutable por defecto" #. type: cindex #, no-wrap msgid "executable, default filename @code{a.out}" msgstr "ejecutable, nombre de fichero por defecto @code{a.out}" #. type: cindex #, no-wrap msgid "default executable filename, @code{a.out}" msgstr "nombre del fichero ejecutable por defecto, @code{a.out}" #. type: Plain text msgid "" "This compiles the source code in @file{hello.c} to machine code and stores " "it in an executable file @file{hello}. The output file for the machine code " "is specified using the @option{-o} option. This option is usually given as " "the last argument on the command line. If it is omitted, the output is " "written to a default file called @file{a.out}." msgstr "" "Esto compila el c@'odigo fuente de @file{hola.es.c} a c@'odigo m@'aquina y " "lo \n" "almacena en el fichero ejecutable @file{hola}. El fichero de salida para " "el \n" "c@'odigo m@'aquina se especifica usando la opci@'on @option{-o}. Esta \n" "opci@'on normalmente es el @'ultimo argumento en la l@'{@dotless{i}}nea de \n" "comandos. Si se omite, la salida es escrita a un fichero por defecto \n" "llamado @file{a.out}." #. type: Plain text msgid "" "Note that if a file with the same name as the executable file already exists " "in the current directory it will be overwritten." msgstr "" "N@'otese que si ya existe un fichero con el mismo nombre que el fichero \n" "ejecutable en el directorio actual, entonces se sobreescribir@'a. " #. type: cindex #, no-wrap msgid "@option{-Wall} option, enable common warnings" msgstr "@option{-Wall}, opci@'on que habilita los avisos comunes" #. type: cindex #, no-wrap msgid "@option{Wall} option, enable common warnings" msgstr "@option{Wall}, opci@'on que habilita los avisos comunes" #. type: cindex #, no-wrap msgid "warning options, @option{-Wall}" msgstr "opciones de aviso, @option{-Wall}" #. type: Plain text msgid "" "The option @option{-Wall} turns on all the most commonly-used compiler " "warnings---@strong{it is recommended that you always use this option!} There " "are many other warning options which will be discussed in later chapters, " "but @option{-Wall} is the most important. GCC will not produce any warnings " "unless they are enabled. Compiler warnings are an essential aid in " "detecting problems when programming in C and C++." msgstr "" "La opci@'on @option{-Wall} activa todos los avisos m@'as comunes \n" "---@strong{@exclamdown{}se recomienda usar siempre esta opci@'on!}. Hay \n" "muchas otras opciones de avisos que ser@'an discutidas en cap@'{@dotless{i}}" "tulos \n" "posteriores, pero @option{-Wall} es la m@'as importante. GCC no " "producir@'a \n" "avisos a menos que est@'en activados. Los avisos del compilador son una \n" "ayuda esencial detectando problemas al programar en C y C++." #. type: Plain text msgid "" "In this case, the compiler does not produce any warnings with the @option{-" "Wall} option, since the program is completely valid. Source code which does " "not produce any warnings is said to @dfn{compile cleanly}." msgstr "" "En este caso, el compilador no produce avisos con la opci@'on \n" "@option{-Wall}, debido a que el programa es completamente v@'alido.\n" "El c@'odigo fuente que no produce avisos se dice que @dfn{compila \n" "limpiamente}." #. type: cindex #, no-wrap msgid "executable, running" msgstr "ejecutable, funcionando" #. type: cindex #, no-wrap msgid "running an executable file, C" msgstr "ejecutando un fichero binario, C" #. type: Plain text msgid "To run the program, type the path name of the executable like this:" msgstr "" "Para ejecutar el programa, escribe la ruta del ejecutable as@'{@dotless" "{i}}:\n" #. type: example #, no-wrap msgid "" "$ ./hello\n" "Hello, world!\n" msgstr "" "$ ./hola\n" "@exclamdown{}Hola, mundo!\n" #. type: Plain text msgid "" "This loads the executable file into memory and causes the CPU to begin " "executing the instructions contained within it. The path @code{./} refers " "to the current directory, so @code{./hello} loads and runs the executable " "file @file{hello} located in the current directory." msgstr "" "Esto carga el fichero ejecutable en memoria y hace que la CPU empiece a \n" "ejecutar las instrucciones que contiene. La ruta @code{./} se refiere al \n" "directorio actual, as@'{@dotless{i}} @code{./hola} carga y ejecuta el " "fichero ejecutable\n" "@file{hola} localizado en el directorio actual." #. type: cindex #, no-wrap msgid "@code{printf}, example of error in format" msgstr "@code{printf}, ejemplo de error por formato" #. type: Plain text msgid "" "As mentioned above, compiler warnings are an essential aid when programming " "in C and C++. To demonstrate this, the program below contains a subtle " "error: it uses the function @code{printf} incorrectly, by specifying a " "floating-point format @samp{%f} for an integer value:" msgstr "" "Como se mencion@'o antes, los avisos del compilador son una ayuda esencial \n" "cuando se programa en C y C++. Para demostrar esto, el programa de debajo \n" "contiene un peque@~no error: usa la funci@'on @code{printf} de manera \n" "incorrecta, especificando un formato en coma flotante @samp{%f} para\n" "un valor entero:" #. type: example #, no-wrap msgid "@verbatiminclude bad.c\n" msgstr "@verbatiminclude mal.es.c\n" #. type: Plain text msgid "" "This error is not obvious at first sight, but can be detected by the " "compiler if the warning option @option{-Wall} has been enabled." msgstr "" "Este error no es obvio a primera vista, pero puede ser detectado por \n" "el compilador si la opci@'on de aviso @option{-Wall} se ha habilitado." #. type: Plain text msgid "" "Compiling the program above, @file{bad.c}, with the warning option @option{-" "Wall} produces the following message:" msgstr "" "Al compilar el anterior programa, @file{mal.es.c}, con la opci@'on \n" "@option{-Wall} produce el siguiente mensaje:" #. type: cindex #, no-wrap msgid "warning, format with different type arg" msgstr "aviso, formato de diferente tipo que el argumento" #. type: cindex #, no-wrap msgid "format, different type arg warning" msgstr "formato, aviso de tipo diferente en el argumento" #. type: cindex #, no-wrap msgid "different type arg, format warning" msgstr "argumento de diferente tipo, aviso de formato" #. type: example #, fuzzy, no-wrap #| msgid "" #| "$ gcc -Wall bad.c -o bad \n" #| "bad.c: In function ‘main’:\n" #| "bad.c:6:3: warning: format ‘%f’ expects argument of\n" #| "type ‘double’, but argument 2 has type ‘int’ [-Wformat]\n" msgid "" "$ gcc -Wall bad.c -o bad \n" "bad.c: In function 'main':\n" "bad.c:6:3: warning: format '%f' expects argument of\n" "type 'double', but argument 2 has type 'int' [-Wformat]\n" msgstr "" "$ gcc -Wall mal.es.c -o mal\n" "mal.es.c: In function ‘main’:\n" "mal.es.c:6:3: warning: format ‘%f’ expects argument of\n" "type ‘double’, but argument 2 has type ‘int’ [-Wformat]\n" #. type: Plain text msgid "" "This indicates that a format string has been used incorrectly in the file " "@file{bad.c} at line 6. The messages produced by GCC always have the form @i" "{file:line-number:message}. The compiler distinguishes between @dfn{error " "messages}, which prevent successful compilation, and @dfn{warning messages} " "which indicate possible problems (but do not stop the program from " "compiling)." msgstr "" "Esto indica que un formato de cadena ha sido usado incorrectamente en el \n" "fichero @file{mal.es.c} en la l@'{@dotless{i}}nea 6. Los mensajes producidos " "por GCC siempre \n" "tienen la forma @i{fichero:n@'umero de l@'{@dotless{i}}nea:mensaje}. El " "compilador \n" "distingue entre @dfn{mensajes de error}, que impiden una compilaci@'on \n" "exitosa, y @dfn{mensajes de aviso} que indican posibles problemas (pero no \n" "detienen la compilaci@'on)." #. type: Plain text msgid "" "In this case, the correct format specifier should be @samp{%d} for an " "integer argument. The allowed format specifiers for @code{printf} can be " "found in any general book on C, such as the @cite{GNU C Library Reference " "Manual} (@pxref{Further reading})." msgstr "" "En este caso, el especificador de formato ser@'a @samp{%d} para un \n" "argumento entero. Los especificadores de formato permitidos para @code" "{printf} \n" "pueden ser encontrados en cualquier libro general de C, tal como el \n" "@cite{GNU C Library Reference Manual} (@pxref{Lectura adicional})." #. type: Plain text msgid "" "Without the warning option @option{-Wall} the program appears to compile " "cleanly, but produces incorrect results:" msgstr "" "Sin la opci@'on de aviso @option{-Wall} el programa compila limpiamente, \n" "pero produce resultados incorrectos:" #. type: cindex #, no-wrap msgid "bug, example of" msgstr "error, ejemplo de" #. type: example #, no-wrap msgid "" "$ gcc bad.c -o bad\n" "$ ./bad\n" "Two plus two is 0.000000 @r{(incorrect output)}\n" msgstr "" "$ gcc mal.es.c -o mal\n" "$ ./mal\n" "Dos y dos son 0.000000 @r{(salida incorrecta)}" #. type: Plain text msgid "" "The incorrect format specifier causes the output to be corrupted, because " "the function @code{printf} is passed an integer instead of a floating-point " "number. Integers and floating-point numbers are stored in different formats " "in memory, and generally occupy different numbers of bytes, leading to a " "spurious result. The actual output shown above may differ, depending on the " "specific platform and environment." msgstr "" "El incorrecto formato especificado causa que la salida est@'e\n" "corrompida, porque a la funci@'on @code{printf} se le pasa un entero\n" "en lugar de un n@'umero en coma flotante. Los n@'umeros enteros y en\n" "coma flotante son almacenados en diferentes formatos en memoria, por\n" "lo general ocupan diferente n@'umero de bytes, obteniendo un falso\n" "resultado. La actual salida que se muestra puede diferir, dependiendo\n" "de la plataforma y el entorno espec@'{@dotless{i}}ficos. " #. type: Plain text msgid "" "Clearly, it is very dangerous to develop a program without checking for " "compiler warnings. If there are any functions which are not used correctly " "they can cause the program to crash or produce incorrect results. Turning on " "the compiler warning option @option{-Wall} will catch many of the commonest " "errors which occur in C programming." msgstr "" "Claramente, es muy peligroso desarrollar un programa sin comprobar los\n" "avisos de compilaci@'on. Si hay alguna funci@'on no usada\n" "correctamente, causar@'a que el programa falle o produzca resultados\n" "incorrectos. Activando los avisos del compilador con la opci@'on\n" "@option{-Wall} se detectar@'an muchos de los m@'as habituales errores\n" "que ocurren programando en C." #. type: cindex #, no-wrap msgid "multiple files, compiling" msgstr "m@'ultiples ficheros, compilando" #. type: cindex #, no-wrap msgid "compiling multiple files" msgstr "compilando m@'ultiples ficheros" #. type: Plain text msgid "" "A program can be split up into multiple files. This makes it easier to edit " "and understand, especially in the case of large programs---it also allows " "the individual parts to be compiled independently." msgstr "" "Un programa puede ser dividido en m@'ultiples ficheros. Facilitando tanto\n" "la edici@'on como la comprensi@'on del c@'odigo, especialmente en el \n" "caso de largos programas ---tambi@'en permite que las partes\n" "individuales sean compiladas de manera independiente. " #. type: Plain text msgid "" "In the following example we will split up the program @dfn{Hello World} into " "three files: @file{main.c}, @file{hello_fn.c} and the header file @file" "{hello.h}. Here is the main program @file{main.c}:" msgstr "" "En el siguiente ejemplo se dividir@'a el programa @dfn{Hola Mundo} en tres \n" "ficheros: @file{main.es.c}, @file{hola_fn.es.c} y el fichero de cabecera \n" "@file{hola.es.h}. Aqu@'{@dotless{i}} est@'a el programa principal @file{main." "es.c}:" #. type: example #, no-wrap msgid "@verbatiminclude main.c\n" msgstr "@verbatiminclude main.es.c\n" #. type: Plain text msgid "" "The original call to the @code{printf} system function in the previous " "program @file{hello.c} has been replaced by a call to a new external " "function @code{hello}, which we will define in a separate file @file" "{hello_fn.c}." msgstr "" "La llamada original a la funci@'on de sistema @code{printf} en el \n" "programa previo @file{hola.es.c} ha sido reemplazado por una llamada a \n" "una nueva funci@'on externa @code{hola}, que se definir@'a en un \n" "fichero separado @file{hola_fn.es.c}" #. type: cindex #, no-wrap msgid "declaration, in header file" msgstr "declaraci@'on, en fichero de cabecera" #. type: cindex #, no-wrap msgid "header file, declarations in" msgstr "fichero de cabecera, declaraciones" #. type: cindex #, no-wrap msgid "@code{.h}, header file extension" msgstr "@code{.h}, extensi@'on de fichero de cabecera" #. type: cindex #, no-wrap msgid "@code{h}, header file extension" msgstr "@code{h}, extensi@'on de fichero de cabecera" #. type: cindex #, no-wrap msgid "header file, @code{.h} extension" msgstr "fichero de cabecera, extensi@'on @code{.h}" #. type: cindex #, no-wrap msgid "file extension, @code{.h} header file" msgstr "extensi@'on de fichero, @code{.h} fichero de cabecera" #. type: cindex #, no-wrap msgid "extension, @code{.h} header file" msgstr "extensi@'on, fichero de cabecera @code{.h}" #. type: Plain text msgid "" "The main program also includes the header file @file{hello.h} which will " "contain the declaration of the function @code{hello}. The declaration is " "used to ensure that the types of the arguments and return value match up " "correctly between the function call and the function definition. We no " "longer need to include the system header file @file{stdio.h} in @file{main." "c} to declare the function @code{printf}, since the file @file{main.c} does " "not call @code{printf} directly." msgstr "" "El programa main tambi@'en incluye el fichero de cabecera @file{hola.es.h} \n" "que contendr@'a la declaraci@'on de la funci@'on @code{hola}. La \n" "declaraci@'on es usada para asegurar que los tipos de los argumentos y el \n" "valor de retorno concuerda correctamente con la llamada de la funci@'on \n" "y la definici@'on de la funci@'on. No se necesita incluir el fichero de \n" "cabecera @file{stdio.h} en @file{main.es.c} para declarar la funci@'on \n" "@code{printf}, ya que el fichero @file{main.es.c} no llama a @code{printf} \n" "directamente." #. type: Plain text msgid "" "The declaration in @file{hello.h} is a single line specifying the prototype " "of the function @code{hello}:" msgstr "" "La declaraci@'on en @file{hola.es.h} es una simple l@'{@dotless{i}}nea que " "especifica el \n" "prototipo de la funci@'on @code{hola}" #. type: example #, no-wrap msgid "@verbatiminclude hello1.h\n" msgstr "@verbatiminclude hola1.es.h\n" #. type: Plain text msgid "" "The definition of the function @code{hello} itself is contained in the file " "@file{hello_fn.c}:" msgstr "" "La definici@'on de la funci@'on @code{hola} en s@'{@dotless{i}} est@'a\n" "contenida en el fichero @file{hola_fn.es.c}:" #. type: example #, no-wrap msgid "@verbatiminclude hello_fn.c\n" msgstr "@verbatiminclude hola_fn.es.c\n" #. type: Plain text msgid "" "This function prints the message ``@code{Hello, }@var{name}@code{!}'' using " "its argument as the value of @var{name}." msgstr "" "Esta funci@'on imprime el mensaje ``@code{@exclamdown{}Hola, }@var{nombre}\n" "@code{!}'' usando como valor de @var{nombre} el argumento introducido." #. type: cindex #, no-wrap msgid "@code{#include}, preprocessor directive" msgstr "@code{#include}, directiva del preprocesador" #. type: Plain text msgid "" "Incidentally, the difference between the two forms of the include statement " "@code{#include \"@var{FILE}.h\"} and @code{#include <@var{FILE}.h>} is that " "the former searches for @file{@var{FILE}.h} in the current directory before " "looking in the system header file directories. The include statement @code" "{#include <@var{FILE}.h>} searches the system header files, but does not " "look in the current directory by default." msgstr "" "Casualmente, la diferencia entre las dos formas de la instrucci@'on de\n" "inclusi@'on @code{#include \"@var{FILE}.h\"} y @code{#include\n" "<@var{FILE}.h>} es que la primera busca el archivo @file{@var{FILE}.h}\n" "en el directorio actual antes de buscarlo en los directorios de los\n" "archivos de cabeceras del sistema. La instrucci@'on de inclusi@'on\n" "@code{#include <@var{FILE}.h>} busca por defecto los archivos de\n" "cabeceras del sistema, pero no busca en el directorio actual. " #. type: Plain text msgid "" "To compile these source files with @code{gcc}, use the following command:" msgstr "" "Para compilar estos ficheros fuente con @code{gcc}, se usa el siguiente \n" "comando:" #. type: example #, no-wrap msgid "$ gcc -Wall main.c hello_fn.c -o newhello\n" msgstr "$ gcc -Wall main.es.c hola_fn.es.c -o nuevohola\n" #. type: Plain text msgid "" "In this case, we use the @option{-o} option to specify a different output " "file for the executable, @file{newhello}. Note that the header file @file" "{hello.h} is not specified in the list of files on the command line. The " "directive @code{#include \"hello.h\"} in the source files instructs the " "compiler to include it automatically at the appropriate points." msgstr "" "En este caso, se usa la opci@'on @option{-o} para especificar un\n" "nombre al fichero de salida diferente para el ejecutable,\n" "@file{nuevohola}. N@'otese que el fichero de cabecera @file{hola.es.h} no\n" "est@'a especificado en la lista de ficheros en la l@'{@dotless{i}}nea\n" "de comandos. La directiva @code{#include \"hola.es.h\"} en los ficheros\n" "fuente ordena al compilador incluirlo de forma autom@'atica en los\n" "puntos apropiados." #. type: Plain text msgid "To run the program, type the path name of the executable:" msgstr "Para ejecutar el programa, se escribe la ruta del ejecutable:" #. type: example #, no-wrap msgid "" "$ ./newhello\n" "Hello, world!\n" msgstr "" "$ ./nuevohola \n" "@exclamdown{}Hola, mundo!\n" #. type: Plain text msgid "" "All the parts of the program have been combined into a single executable " "file, which produces the same result as the executable created from the " "single source file used earlier." msgstr "" "Todas las partes del programa han sido combinadas en un solo fichero \n" "ejecutable, que produce el mismo resultado que el ejecutable creado \n" "desde el fichero fuente usado anteriormente." #. type: cindex #, no-wrap msgid "compiling files independently" msgstr "compilando ficheros de manera independiente" #. type: cindex #, no-wrap msgid "independent compilation of files" msgstr "independiente compilaci@'on de ficheros" #. type: Plain text msgid "" "If a program is stored in a single file then any change to an individual " "function requires the whole program to be recompiled to produce a new " "executable. The recompilation of large source files can be very time-" "consuming." msgstr "" "Si un programa es almacenado en un solo fichero, entonces cualquier \n" "cambio en una funci@'on individual requiere que el programa entero \n" "sea recompilado para producir un nuevo ejecutable. La recompilaci@'on \n" "de largos ficheros fuente puede consumir mucho tiempo." #. type: cindex #, no-wrap msgid "linking, explanation of" msgstr "enlace, explicaci@'on de" #. type: cindex #, no-wrap msgid "object file, explanation of" msgstr "fichero objeto, explicaci@'on de" #. type: cindex #, no-wrap msgid "@code{.o}, object file extension" msgstr "@code{.o}, extensi@'on de fichero objeto" #. type: cindex #, no-wrap msgid "@code{o}, object file extension" msgstr "@code{o}, extensi@'on de fichero objeto" #. type: cindex #, no-wrap msgid "file extension, @code{.o} object file" msgstr "extensi@'on de fichero, fichero objeto @code{.o}" #. type: cindex #, no-wrap msgid "extension, @code{.o} object file" msgstr "extensi@'on, fichero objeto @code{.o}" #. type: cindex #, no-wrap msgid "object file, @code{.o} extension" msgstr "fichero objeto, extensi@'on @code{.o}" #. type: Plain text msgid "" "When programs are stored in independent source files, only the files which " "have changed need to be recompiled after the source code has been modified. " "In this approach, the source files are compiled separately and then @dfn" "{linked} together---a two stage process. In the first stage, a file is " "compiled without creating an executable. The result is referred to as an " "@dfn{object file}, and has the extension @file{.o} when using GCC." msgstr "" "Cuando los programas son almacenados en ficheros fuente independientes, \n" "solo los ficheros que han cambiado necesitan ser recompilados despu@'es de \n" "que el c@'odigo fuente haya sido modificado. De este modo, los ficheros \n" "fuente son compilados separadamente y @dfn{enlazados} juntos ---es un\n" "proceso de dos fases. En la primera fase, un fichero es compilado sin\n" "crear el ejecutable. El resultado es un @dfn{fichero objeto}, y tiene\n" "la extensi@'on @file{.o} al usar GCC. " #. type: Plain text msgid "" "In the second stage, the object files are merged together by a separate " "program called the @dfn{linker}. The linker combines all the object files " "to create a single executable." msgstr "" "En la segunda fase, los ficheros objeto son unidos por otro programa \n" "llamado @dfn{enlazador}. El enlazador combina todos los ficheros\n" "objeto creando un solo ejecutable." #. type: Plain text msgid "" "An object file contains machine code where any references to the memory " "addresses of functions (or variables) in other files are left undefined. " "This allows source files to be compiled without direct reference to each " "other. The linker fills in these missing addresses when it produces the " "executable." msgstr "" "Un fichero objeto contiene c@'odigo m@'aquina en el cual las referencias \n" "a direcciones de memoria de funciones (@'o variables) de otros ficheros \n" "se dejan indefinidas. Esto permite que los ficheros fuentes se compilen \n" "sin referencia directa a otros. El enlazador rellena estas direcciones\n" "perdidas cuando produce el ejecutable." #. type: subsection #, no-wrap msgid "Creating object files from source files" msgstr "Creando archivos objeto desde archivos fuente" #. type: subsection #, no-wrap msgid "Creating executables from object files" msgstr "Creando ejecutables desde archivos objeto" #. type: cindex #, no-wrap msgid "creating object files from source files" msgstr "creando ficheros objeto desde ficheros fuente" #. type: cindex #, no-wrap msgid "@option{-c} option, compile to object file" msgstr "@option{-c}, opci@'on para compilar a fichero objeto" #. type: cindex #, no-wrap msgid "@option{c} option, compile to object file" msgstr "@option{c}, opci@'on para compilar a fichero objeto" #. type: cindex #, no-wrap msgid "compile to object file, @option{-c} option" msgstr "compila a fichero objeto, opci@'on @option{-c}" #. type: cindex #, no-wrap msgid "object file, creating from source using option @option{-c}" msgstr "fichero objeto, creando desde las fuentes usando la opci@'on @option{-c}" #. type: Plain text msgid "" "The command-line option @option{-c} is used to compile a source file to an " "object file. For example, the following command will compile the source " "file @file{main.c} to an object file:" msgstr "" "La opci@'on @option{-c} es usada para compilar un fichero fuente para \n" "crear un fichero objeto. Por ejemplo, el siguiente comando compilar@'a \n" "el fichero fuente @file{main.es.c} para generar un fichero objeto:" #. type: example #, no-wrap msgid "$ gcc -Wall -c main.c\n" msgstr "$ gcc -Wall -c main.es.c" #. type: Plain text msgid "" "This produces an object file @file{main.o} containing the machine code for " "the @code{main} function. It contains a reference to the external function " "@code{hello}, but the corresponding memory address is left undefined in the " "object file at this stage (it will be filled in later by linking)." msgstr "" "Esto produce un fichero objeto @file{main.o} que contiene el c@'odigo \n" "m@'aquina para la funci@'on @code{main}. @'Este contiene una referencia \n" "la funci@'on externa @code{hola}, pero la correspondiente direcci@'on \n" "de memoria se deja indefinida en el fichero objeto en esta fase (se \n" "introducir@'a despu@'es al enlazarse)." #. type: Plain text msgid "" "The corresponding command for compiling the @code{hello} function in the " "source file @file{hello_fn.c} is:" msgstr "" "El correspondiente comando para compilar la funci@'on @code{hola} en el\n" "c@'odigo fuente @file{hola_fn.es.c} es:" #. type: example #, no-wrap msgid "$ gcc -Wall -c hello_fn.c\n" msgstr "$ gcc -Wall -c hola_fn.es.c\n" #. type: Plain text msgid "This produces the object file @file{hello_fn.o}." msgstr "Esto produce el fichero objeto @file{hola_fn.o}." #. type: Plain text msgid "" "Note that there is no need to use the option @option{-o} to specify the name " "of the output file in this case. When compiling with @option{-c} the " "compiler automatically creates an object file whose name is the same as the " "source file, but with @file{.o} instead of the original extension." msgstr "" "N@'otese que no hay necesidad de usar la opci@'on @option{-o} para \n" "especificar el nombre del fichero de salida en este caso. Al compilar \n" "con la opci@'on @option{-c} el compilador de forma autom@'atica crea\n" "un fichero objeto cuyo nombre es el mismo que el fichero fuente, pero\n" "con @file{.o} en vez de la extensi@'on original." #. type: cindex #, no-wrap msgid "header file, not compiled" msgstr "fichero de cabecera, no compilado" #. type: Plain text msgid "" "There is no need to put the header file @file{hello.h} on the command line, " "since it is automatically included by the @code{#include} statements in @file" "{main.c} and @file{hello_fn.c}." msgstr "" "No hay necesidad de poner el fichero de cabecera @file{hola.es.h} en la \n" "l@'{@dotless{i}}nea de comandos, ya que se incluye de forma\n" "autom@'atica gracias a las sentencias @code{#include} en @file{main.es.c}\n" "y @file{hola_fn.es.c}." #. type: cindex #, no-wrap msgid "creating executable files from object files" msgstr "creando ficheros ejecutables desde ficheros objeto" #. type: cindex #, no-wrap msgid "linking, creating executable files from object files" msgstr "enlazando, creando ficheros ejecutables desde ficheros objeto" #. type: cindex #, no-wrap msgid "executable, creating from object files by linking" msgstr "ejecutable, creando ficheros objeto al enlazar" #. type: cindex #, no-wrap msgid "object files, linking to create executable file" msgstr "ficheros objeto, enlazando para crear un fichero ejecutable" #. type: Plain text msgid "" "The final step in creating an executable file is to use @code{gcc} to link " "the object files together and fill in the missing addresses of external " "functions. To link object files together, they are simply listed on the " "command line:" msgstr "" "El paso final para crear un fichero ejecutable es usar @code{gcc} para \n" "enlazar los ficheros objetos juntos y llenar las direcciones perdidas \n" "de funciones externas. Para enlazar ficheros objetos juntos, simplemente \n" "se listan en el siguiente comando:" #. type: example #, no-wrap msgid "$ gcc main.o hello_fn.o -o hello\n" msgstr "$ gcc main.o hola_fn.o -o hola\n" #. type: Plain text msgid "" "This is one of the few occasions where there is no need to use the @option{-" "Wall} warning option, since the individual source files have already been " "successfully compiled to object code. Once the source files have been " "compiled, linking is an unambiguous process which either succeeds or fails " "(it fails only if there are references which cannot be resolved)." msgstr "" "Esta es una de las pocas ocasiones en las que no hay necesidad de \n" "usar la opci@'on de avisos @option{-Wall}, debido a que los ficheros \n" "fuente individuales han sido compilados exitosamente en c@'odigo \n" "objeto. Una vez que los ficheros fuente han sido compilados, enlazar \n" "es un proceso ambiguo que tendr@'a @'exito o fallar@'a (falla solo\n" "si hay referencias que no pueden ser resueltas). " #. type: cindex #, no-wrap msgid "linker, initial description" msgstr "enlazador, descripci@'on inicial" #. type: Plain text msgid "" "To perform the linking step @code{gcc} uses the linker @code{ld}, which is a " "separate program. On GNU systems the GNU linker, GNU @code{ld}, is used. " "Other systems may use the GNU linker with GCC, or may have their own " "linkers. The linker itself will be discussed later (@pxref{How the compiler " "works}). By running the linker, @code{gcc} creates an executable file from " "the object files." msgstr "" "Para realizar el paso de enlazar @code{gcc} usar el enlazador\n" "@code{ld}, que es un programa separado. En sistemas GNU se usa el\n" "enlazador de GNU, GNU @code{ld}. Otros sistemas pueden usar el\n" "enlazador de GNU con GCC, o pueden tener sus propios enlazadores. El\n" "enlazador en s@'{@dotless{i}} ser@'a discutido despu@'es (@pxref{Como\n" "funciona el compilador}). Al ejecutar el enlazador, @code{gcc} crea un\n" "fichero ejecutable desde los ficheros objeto." #. type: Plain text msgid "The resulting executable file can now be run:" msgstr "El fichero ejecutable resultante puede ejecutarse ahora:" #. type: Plain text msgid "" "It produces the same output as the version of the program using a single " "source file in the previous section." msgstr "" "Se produce la misma salida que en la versi@'on del programa que usa un\n" "solo fichero fuente visto en la secci@'on previa." #. type: cindex #, no-wrap msgid "recompiling modified source files" msgstr "recompilando ficheros fuente modificados" #. type: cindex #, no-wrap msgid "relinking updated object files" msgstr "reenlazando ficheros objeto actualizados" #. type: cindex #, no-wrap msgid "modified source files, recompiling" msgstr "ficheros fuente modificados, recompilando" #. type: cindex #, no-wrap msgid "updated object files, relinking" msgstr "ficheros objeto actualizados, reenlazando" #. type: cindex #, no-wrap msgid "source files, recompiling" msgstr "ficheros fuente, recompilando" #. type: cindex #, no-wrap msgid "object files, relinking" msgstr "ficheros objeto, reenlazando" #. type: cindex #, no-wrap msgid "C programs, recompiling after modification" msgstr "programas C, recompilando despu@'es de modificarse" #. type: Plain text msgid "" "To show how source files can be compiled independently we will edit the main " "program @file{main.c} and modify it to print a greeting to @code{everyone} " "instead of @code{world}:" msgstr "" "Para mostrar c@'omo los ficheros fuente pueden ser compilados de manera \n" "independiente se editar@'a el programa @file{main.es.c} para imprimir un \n" "saludo para @code{cualquiera} en vez de @code{mundo}:" #. type: example #, no-wrap msgid "@verbatiminclude main2.c\n" msgstr "@verbatiminclude main2.es.c\n" #. type: Plain text msgid "" "The updated file @file{main.c} can now be recompiled with the following " "command:" msgstr "" "El fichero actualizado @file{main.es.c} ahora puede ser recompilado con \n" "el siguiente comando:" #. type: example #, no-wrap msgid "$ gcc -Wall -c main2.c\n" msgstr "$ gcc -Wall -c main2.es.c" #. type: cindex #, no-wrap msgid "updated source files, recompiling" msgstr "ficheros fuente actualizados, recompilando" #. type: Plain text msgid "" "This produces a new object file @file{main.o}. There is no need to create a " "new object file for @file{hello_fn.c}, since that file and the related files " "that it depends on, such as header files, have not changed." msgstr "" "Esto produce un nuevo fichero objeto @file{main.o}. No se necesita crear " "un \n" "nuevo fichero objeto para @file{hola_fn.es.c}, debido a que el fichero y " "los \n" "ficheros relacionados de los que depende, tales como ficheros de " "cabeceras, \n" "no han cambiado." #. type: cindex #, no-wrap msgid "linking, updated object files" msgstr "enlazando, ficheros objeto actualizados" #. type: Plain text msgid "" "The new object file can be relinked with the @code{hello} function to create " "a new executable file:" msgstr "" "El nuevo fichero objeto puede ser reenlazado con la funci@'on @code{hola} \n" "para crear un nuevo fichero ejecutable:" #. type: example #, no-wrap msgid "$ gcc main2.o hello_fn.o -o hello\n" msgstr "$ gcc main2.es.o hola_fn.o -o hola" #. type: Plain text msgid "" "The resulting executable @file{hello} now uses the new @code{main} function " "to produce the following output:" msgstr "" "El ejecutable resultante @file{hola} ahora usa la nueva funci@'on\n" "@code{main} para producir la siguiente salida:" #. type: example #, no-wrap msgid "" "$ ./hello\n" "Hello, everyone!\n" msgstr "" "$ ./hola\n" "@exclamdown{}Hola, cualquiera!\n" #. type: Plain text msgid "" "Note that only the file @file{main.c} has been recompiled, and then relinked " "with the existing object file for the @code{hello} function. If the file " "@file{hello_fn.c} had been modified instead, we could have recompiled @file" "{hello_fn.c} to create a new object file @file{hello_fn.o} and relinked this " "with the existing file @file{main.o}.@footnote{If the prototype of a " "function has changed, it is necessary to modify and recompile all of the " "other source files which use it.}" msgstr "" "N@'otese que solo el fichero @file{main.es.c} ha sido recompilado y, por " "tanto,\n" "reenlazado con el fichero objeto existente para la funci@'on @code{hola}. " "Si\n" "el fichero @file{hola_fn.es.c} hubiera sido modificado, se podr@'{@dotless" "{i}}a haber \n" "recompilado @file{hola_fn.es.c} para crear un nuevo fichero objeto \n" "@file{hola_fn.o} y reenlazar este con el fichero @file{main.o}.@footnote" "{Si \n" "el prototipo de una funci@'on cambia, es necesario modificar y recompilar \n" "todos los ficheros fuentes que la usan.}" #. type: Plain text msgid "" "In a large project with many source files, recompiling only those that have " "been modified can make a significant saving. The process of recompiling " "only the modified files in a project can be automated with the standard Unix " "program @code{make}." msgstr "" "En un gran proyecto con muchos ficheros fuente, recompilar solo aquellos \n" "que han sido modificados crea un significativo ahorro. El proceso de \n" "recompilar solo los ficheros modificados en un proyecto puede ser \n" "automatizado con el programa est@'andar de Unix @code{make}." #. type: cindex #, no-wrap msgid "makefile, example of" msgstr "makefile, ejemplo de" #. type: cindex #, no-wrap msgid "GNU Make" msgstr "GNU Make" #. type: Plain text msgid "" "For those unfamiliar with @code{make}, this section provides a simple " "demonstration of its use. Make is a program in its own right and can be " "found on all Unix systems. To learn more about the GNU version of @code" "{make} you will need to consult the @cite{GNU Make} manual by Richard M. " "Stallman and Roland McGrath (@pxref{Further reading})." msgstr "" "Para aquellos no familiarizados con @code{make}, esta secci@'on provee\n" "una demostraci@'on de su uso. @code{make} es un programa propio que\n" "puede ser encontrado en todos los sistemas Unix. Para aprender m@'as\n" "acerca de la versi@'on GNU de @code{make} se necesitar@'a consultar el\n" "manual de @cite{GNU Make} escrito por Richard M. Stallman y Roland\n" "McGrath (@pxref{Lectura adicional})." #. type: cindex #, no-wrap msgid "target, in makefile" msgstr "objetivo, en makefile" #. type: cindex #, no-wrap msgid "dependency, in makefile" msgstr "dependencia, en makefile" #. type: cindex #, no-wrap msgid "command, in makefile" msgstr "comando, en makefile" #. type: Plain text msgid "" "Make reads a description of a project from a @dfn{makefile} (by default, " "called @file{Makefile} in the current directory). A makefile specifies a " "set of compilation rules in terms of @dfn{targets} (such as executables) and " "their @dfn{dependencies} (such as object files and source files) in the " "following format:" msgstr "" "@code{make} lee una descripci@'on de un proyecto desde un archivo\n" "conocido por @dfn{makefile} (por defecto, llamado @file{Makefile} en\n" "el directorio actual). Un makefile especifica un conjunto de reglas de\n" "compilaci@'on en t@'erminos de @dfn{objetivos} (tal como ejecutables)\n" "y sus @dfn{dependencias} (tal como ficheros objeto y ficheros fuente)\n" "en el siguiente formato:" #. type: example #, no-wrap msgid "" "@i{target}: @i{dependencies}\n" " @i{command}\n" msgstr "" "@i{objetivo}: @i{dependencias}\n" " @i{comando}\n" #. type: cindex #, no-wrap msgid "tab, in makefiles" msgstr "tabulador, en makefiles" #. type: cindex #, no-wrap msgid "separator, in makefiles" msgstr "separador, en makefiles" #. type: Plain text msgid "" "For each target, make checks the modification time of the corresponding " "dependency files to determine whether the target needs to be rebuilt using " "the corresponding command. Note that the @code{@i{command}} lines in a " "makefile must be indented with a single @key{TAB} character, not spaces." msgstr "" "Por cada objetivo, make chequea el momento de modificaci@'on de los \n" "correspondientes ficheros de dependencia para determinar si el objetivo \n" "necesita ser reconstruido usando el correspondiente comando. N@'otese\n" "que las l@'{@dotless{i}}neas de @code{@i{comandos}} en un makefile\n" "deben ser indentadas con un car@'acter @key{TAB}, sin espacios. " #. type: cindex #, no-wrap msgid "implicit rules, in makefile" msgstr "reglas impl@'{@dotless{i}}citas, en makefile" #. type: cindex #, no-wrap msgid "rules, in makefile" msgstr "reglas, en makefile" #. type: cindex #, no-wrap msgid "@code{CFLAGS}, make variable" msgstr "@code{CFLAGS}, variable make" #. type: cindex #, no-wrap msgid "@code{CC}, make variable" msgstr "@code{CC}, variable make" #. type: cindex #, no-wrap msgid "@code{CXX}, make variable" msgstr "@code{CXX}, variable make" #. type: cindex #, no-wrap msgid "@code{CXXFLAGS}, make variable" msgstr "@code{CXXFLAGS}, variable make" #. type: cindex #, no-wrap msgid "@code{CPPFLAGS}, make variable" msgstr "@code{CPPFLAGS}, variable make" #. type: cindex #, no-wrap msgid "variables, in make" msgstr "variables, en make" #. type: Plain text msgid "" "GNU Make contains many default rules, referred to as @dfn{implicit} rules, " "to simplify the construction of makefiles. For example, these specify that " "@file{.o} files can be obtained from @file{.c} files by compilation, and " "that an executable can be made by linking together @file{.o} files. " "Implicit rules are defined in terms of @dfn{make variables}, such as @code" "{CC} (the C compiler) and @code{CFLAGS} (the compilation options for C " "programs), which can be set using @code{@i{VARIABLE}=@i{VALUE}} lines in the " "makefile. For C++ the equivalent variables are @code{CXX} and @code" "{CXXFLAGS}, while the make variable @code{CPPFLAGS} sets the preprocessor " "options. The implicit and user-defined rules are automatically chained " "together as necessary by GNU Make." msgstr "" "GNU Make contiene muchas reglas por defecto, llamadas reglas \n" "@dfn{impl@'{@dotless{i}}citas}, para simplificar la construcci@'on de " "makefiles. Por \n" "ejemplo, estos especifican que ficheros @file{.o} pueden ser obtenidos \n" "desde ficheros @file{.c} al compilarse, y que un ejecutable puede ser \n" "creado enlazando ficheros @file{.o} juntos. Las reglas impl@'{@dotless{i}}" "citas son \n" "definidas en t@'erminos de @dfn{variables make}, tales como @code{CC} \n" "(el compilador de C) y @code{CFLAGS} (las opciones de compilaci@'on para \n" "programas C), que pueden ser asignadas usando l@'{@dotless{i}}neas\n" "@code{@i{VARIABLE}=@i{VALUE}} en el makefile. Para C++ las variables\n" "equivalentes son @code{CXX} y @code{CXXFLAGS}, mientras la variable\n" "@code{CPPFLAGS} asigna las opciones del preprocesador. Las reglas\n" "impl@'{@dotless{i}}citas y las definidas por el usuario se encadenadan\n" "juntas de forma autom@'atica como GNU Make necesite." #. type: Plain text msgid "" "A simple @file{Makefile} for the project above can be written as follows:" msgstr "" "Un @file{Makefile} simple para el proyecto anterior puede ser escrito\n" "como sigue:" #. type: example #, no-wrap msgid "@verbatiminclude c1makefile2\n" msgstr "@verbatiminclude c1makefile2\n" #. type: Plain text msgid "" "The file can be read like this: using the C compiler @command{gcc}, with " "compilation option @option{-Wall}, build the target executable @code{main} " "from the object files @file{main.o} and @file{hello_fn.o} (these, in turn, " "will be built via implicit rules from @file{main.c} and @file{hello_fn.c}). " "The target @code{clean} has no dependencies and simply removes all the " "compiled files.@footnote{This assumes that there is no file called @file" "{clean} in the current directory---see the discussion of ``phony targets'' " "in the GNU Make manual for details.} The option @option{-f} (force) on the " "@command{rm} command suppresses any error messages if the files do not exist." msgstr "" "El fichero puede ser leido de la manera siguiente: usando el compilador de \n" "C @command{gcc}, con la opci@'on de compilaci@'on @option{-Wall}, se \n" "construir@'a el objetivo ejecutable @code{main} desde los ficheros objeto \n" "@file{main.o} y @file{hola_fn.o} (estos, en cambio, ser@'an construidos \n" "v@'{@dotless{i}}a reglas impl@'{@dotless{i}}citas desde @file{main.es.c} y " "@file{hola_fn.es.c}. El \n" "objetivo @code{clean} no tiene dependencias y simplemente elimina todos \n" "los ficheros compilados.@footnote{Esto asume que no hay ning@'un fichero \n" "llamado @file{clean} en el directorio actual ---ver la discusi@'on de\n" "`falsos objetivos' en el manual GNU Make para m@'as detalles.} La\n" "opci@'on @option{-f} (fuerza) que en el comando @command{rm} se\n" "suprima cualquier mensaje de error si los ficheros no existen." #. type: Plain text msgid "" "To use the makefile, type @command{make}. When called with no arguments, " "the first target in the makefile is built, producing the executable @file" "{main}:" msgstr "" "Para usar el makefile, se escribe @command{make}. Al llamarse sin " "argumentos, \n" "se construye el primer objetivo en el makefile, produciendo el ejecutable \n" "@file{main}." #. type: example #, no-wrap msgid "" "$ make\n" "gcc -Wall -c -o main.o main.c\n" "gcc -Wall -c -o hello_fn.o hello_fn.c\n" "gcc main.o hello_fn.o -o main\n" "$ ./main\n" "Hello, world!\n" msgstr "" "$ make\n" "gcc -Wall -c -o main.o main.es.c\n" "gcc -Wall -c -o hola_fn.o hola_fn.es.c\n" "gcc main.o hola_fn.o -o main\n" "$ ./main\n" "@exclamdown{}Hola, mundo!\n" #. type: Plain text msgid "" "To rebuild the executable after modifying a source file, simply type @command" "{make} again. By checking the timestamps of the target and dependency files, " "make identifies the files which have changed and regenerates the " "corresponding intermediate files needed to update the targets:" msgstr "" "Para reconstruir el ejecutable despu@'es de modificar un fichero \n" "fuente, simplemente se escribe @command{make} de nuevo. Al comprobar\n" "las fechas de modificaci@'on de los objetivos y de los ficheros \n" "dependientes, make identifica los ficheros que han cambiado y \n" "regenera los ficheros intermedios correspondientes y necesarios para\n" "actualizar los objetivos:" #. type: example #, no-wrap msgid "" "$ emacs main.c @r{(edit the file)}\n" "$ make\n" "gcc -Wall -c -o main.o main.c\n" "gcc main.o hello_fn.o -o main\n" "$ ./main\n" "Hello, everyone!\n" msgstr "" "$ emacs main.es.c @r{(editar el fichero)}\n" "$ make\n" "gcc -Wall -c -o main.o main.es.c\n" "gcc main.o hola_fn.o -o main\n" "$ ./main\n" "@exclamdown{}Hola, cualquiera!\n" #. type: Plain text msgid "Finally, to remove the generated files, type @command{make clean}:" msgstr "" "Finalmente, para eliminar los ficheros generados, se escribe \n" "@command{make clean}:" #. type: example #, no-wrap msgid "" "$ make clean\n" "rm -f main main.o hello_fn.o\n" msgstr "" "$ make clean\n" "rm -f main main.o hola_fn.o\n" #. type: Plain text msgid "" "A more sophisticated makefile would usually contain additional targets for " "installation (@code{make install}) and testing (@code{make check})." msgstr "" "Un makefile m@'as sofisticado normalmente contiene objetivos adicionales \n" "para instalaci@'on (@code{make install}) y testeo (@code{make check})." #. type: Plain text msgid "" "The examples in the rest of this book are small enough not to need " "makefiles, but the use of make is recommended for any larger programs." msgstr "" "Los ejemplos del resto de este libro son suficientemente peque@~nos\n" "para no necesitar makefiles, pero el uso de make se recomienda \n" "en programas largos." #. type: cindex #, no-wrap msgid "linking, with external libraries" msgstr "enlazando, con librer@'{@dotless{i}}as externas" #. type: cindex #, no-wrap msgid "libraries, linking with" msgstr "librer@'{@dotless{i}}as, enlazando con" #. type: cindex #, no-wrap msgid "@code{sqrt}, example of linking with" msgstr "@code{sqrt}, ejemplo de enlazando con" #. type: cindex #, no-wrap msgid "C math library" msgstr "C math library" #. type: cindex #, no-wrap msgid "library, C math library" msgstr "librer@'{@dotless{i}}a, C math library" #. type: cindex #, no-wrap msgid "math library" msgstr "librer@'{@dotless{i}}a matem@'atica" #. type: cindex #, no-wrap msgid "system libraries" msgstr "librer@'{@dotless{i}}as de sistema" #. type: cindex #, no-wrap msgid "external libraries, linking with" msgstr "librer@'{@dotless{i}}as externas, enlazando con" #. type: Plain text msgid "" "A library is a collection of precompiled object files which can be linked " "into programs. The most common use of libraries is to provide system " "functions, such as the square root function @code{sqrt} found in the C math " "library." msgstr "" "Una librer@'{@dotless{i}}a es una colecci@'on de ficheros objetos\n" "precompilados que pueden ser enlazados dentro de programas. El uso\n" "m@'as com@'un de librer@'{@dotless{i}}as es proporcionar funciones de\n" "sistema, tales como la funci@'on ra@'{@dotless{i}}z cuadrada\n" "@code{sqrt} que se encuentra en la librer@'{@dotless{i}}a matem@'atica\n" "de C. " #. type: cindex #, no-wrap msgid "libraries, stored in archive files" msgstr "librer@'{@dotless{i}}as, almacenado en ficheros de archivo" #. type: cindex #, no-wrap msgid "archive file, explanation of" msgstr "fichero de archivo, explicaci@'on de" #. type: cindex #, no-wrap msgid "@code{.a}, archive file extension" msgstr "@code{.a}, extensi@'on de fichero de archivo" #. type: cindex #, no-wrap msgid "@code{a}, archive file extension" msgstr "@code{a}, extensi@'on de fichero de archivo" #. type: cindex #, no-wrap msgid "file extension, @code{.a} archive file" msgstr "extensi@'on del fichero, fichero de archivo @code{.a}" #. type: cindex #, no-wrap msgid "extension, @code{.a} archive file" msgstr "extensi@'on, fichero de archivo @code{.a}" #. type: cindex #, no-wrap msgid "archive file, @code{.a} extension" msgstr "fichero de archivo, extensi@'on @code{.a}" #. type: cindex #, no-wrap msgid "GNU archiver, @code{ar}" msgstr "Archivador de GNU, @code{ar}" #. type: cindex #, no-wrap msgid "@code{ar}, GNU archiver" msgstr "@code{ar}, GNU archiver" #. type: Plain text msgid "" "Libraries are typically stored in special @dfn{archive files} with the " "extension @file{.a}, referred to as @dfn{static libraries}. They are " "created from object files with a separate tool, the GNU archiver @code{ar}, " "and used by the linker to resolve references to functions at compile-time. " "We will see later how to create libraries using the @command{ar} command " "(@pxref{Compiler-related tools}). For simplicity, only static libraries are " "covered in this section---dynamic linking at runtime using @dfn{shared " "libraries} will be described in the next chapter." msgstr "" "Las librer@'{@dotless{i}}as suelen almacenarse en @dfn{ficheros de " "archivo} \n" "especiales con la extensi@'on @file{.a}, tambi@'en llamadas \n" "@dfn{librer@'{@dotless{i}}as est@'aticas}. @'Estas son creadas desde " "ficheros \n" "objeto con una herramienta propia, el archivador de GNU @code{ar}, \n" "y es usado por el enlazador para resolver referencias a funciones en \n" "tiempo de compilaci@'on. Despu@'es veremos c@'omo crear librer@'{@dotless{i}}" "as \n" "usando el comando @command{ar} (@pxref{Utilidades relativas al\n" "compilador}). Por simplicidad, s@'olo las librer@'{@dotless{i}}as\n" "est@'aticas se cubren en esta secci@'on ---el enlazado din@'amico en\n" "tiempo de ejecuci@'on usando @dfn{librer@'{@dotless{i}}as compartidas}\n" "ser@'a descrito en el siguiente cap@'{@dotless{i}}tulo." #. type: cindex #, no-wrap msgid "system libraries, location of" msgstr "librer@'{@dotless{i}}as de sistemas, localizaci@'on de" #. type: cindex #, no-wrap msgid "C standard library" msgstr "C standard library" #. type: cindex #, no-wrap msgid "C library, standard" msgstr "C library, standard" #. type: cindex #, no-wrap msgid "standard library, C" msgstr "standard library, C" #. type: cindex #, no-wrap msgid "library, C standard library" msgstr "librer@'{@dotless{i}}a, C standard library" #. type: Plain text msgid "" "The standard system libraries are usually found in the directories @file{/" "usr/lib} and @file{/lib}.@footnote{On systems supporting both 64 and 32-bit " "executables the 64-bit versions of the libraries will often be stored in " "@file{/usr/lib64} and @file{/lib64}, with the 32-bit versions in @file{/usr/" "lib} and @file{/lib}. Libraries may sometimes be also found in an " "architecture-specific directory, such as @file{/usr/lib/i386-linux-gnu/}} " "For example, the C math library is typically stored in the file @file{/usr/" "lib/libm.a} on Unix-like systems. The corresponding prototype declarations " "for the functions in this library are given in the header file @file{/usr/" "include/math.h}. The C standard library itself is stored in @file{/usr/lib/" "libc.a} and contains functions specified in the ANSI/ISO C standard, such as " "@samp{printf}---this library is linked by default for every C program." msgstr "" "El sistema de librer@'{@dotless{i}}as est@'andar normalmente se\n" "encuentra en los directorios @file{/usr/lib} y\n" "@file{/lib}.@footnote{En sistemas que soportan versiones de\n" "librer@'{@dotless{i}}as ejecutables de 32 y 64 bits, las versiones de\n" "64 bit se almacenar@'an frecuentemente en @file{/usr/lib64} y\n" "@file{/lib64}, y las versiones de 32 bits en @file{/usr/lib} y\n" "@file{lib}.} Las librer@'{@dotless{i}}as algunas veces pueden ser\n" "encontradas en un directorio espec@'{@dotless{i}}fico de la\n" "arquitectura, como @file{/usr/lib/i386-linux-gnu/}. Por ejemplo, la\n" "librer@'{@dotless{i}}a matem@'atica de C est@'a almacenada normalmente\n" "en el fichero @file{/usr/lib/libm.a} en sistemas tipo Unix. Las\n" "declaraciones de prototipo correspondientes a las funciones de esta\n" "librer@'{@dotless{i}}a se realizan en el fichero de cabecera\n" "@file{/usr/include/math.h}. La librer@'{@dotless{i}}a est@'andar de C\n" "en s@'{@dotless{i}} misma es almacenada en @file{/usr/lib/libc.a} y\n" "contiene funciones especificadas en el est@'andar ANSI/ISO C, tal como\n" "@samp{printf} ---esta librer@'{@dotless{i}}a es enlazada por defecto\n" "en cada programa C." #. type: Plain text msgid "" "Here is an example program which makes a call to the external function @code" "{sqrt} in the math library @file{libm.a}:" msgstr "" "Aqu@'{@dotless{i}} se muestra un programa de ejemplo que realiza una llamada " "a la \n" "funci@'on externa @code{sqrt} en la librer@'{@dotless{i}}a matem@'atica @file" "{libm.a}:" #. type: example #, no-wrap msgid "@verbatiminclude calc.c\n" msgstr "@verbatiminclude calc.es.c\n" #. type: Plain text msgid "" "Trying to create an executable from this source file alone causes the " "compiler to give an error at the link stage:" msgstr "" "Intentar crear un ejecutable desde este @'unico fichero fuente causa \n" "que el compilador devuelva un error en la fase de enlace:" #. type: cindex #, no-wrap msgid "undefined reference error" msgstr "error de referencia no definida" #. type: cindex #, no-wrap msgid "reference, undefined due to missing library" msgstr "referencia, no definida debido a librer@'{@dotless{i}}a perdida" #. type: cindex #, no-wrap msgid "libraries, link error due to undefined reference" msgstr "librer@'{@dotless{i}}as, error de enlace debido a referencia indefinida" #. type: group #, no-wrap msgid "" "$ gcc -Wall calc.c -o calc\n" "/tmp/ccbR6Ojm.o: In function `main':\n" "/tmp/ccbR6Ojm.o(.text+0x19): undefined reference \n" " to `sqrt'\n" msgstr "" "$ gcc -Wall calc.es.c -o calc\n" "/tmp/ccbR6Ojm.o: In function `main':\n" "/tmp/ccbR6Ojm.o(.text+0x19): undefined reference \n" " to `sqrt'\n" #. type: Plain text msgid "" "The problem is that the reference to the @code{sqrt} function cannot be " "resolved without the external math library @file{libm.a}. The function @code" "{sqrt} is not defined in the program or the default library @file{libc.a}, " "and the compiler does not link to the file @file{libm.a} unless it is " "explicitly selected." msgstr "" "El problema es que la referencia a la funci@'on @code{sqrt} no puede\n" "ser resuelta sin la librer@'{@dotless{i}}a matem@'atica externa\n" "@file{libm.a}. La funci@'on @code{sqrt} no est@'a definida en el\n" "programa o en la librer@'{@dotless{i}}a por defecto @file{libc.a}, y\n" "el compilador no enlaza al fichero @file{libm.a} a menos que @'este\n" "est@'e expl@'{@dotless{i}}citamente seleccionado." #. type: cindex #, no-wrap msgid "@file{/tmp} directory, temporary files" msgstr "directorio @file{/tmp}, ficheros temporales" #. type: cindex #, no-wrap msgid "temporary files, written to @file{/tmp}" msgstr "ficheros temporales, escritos en @file{/tmp}" #. type: cindex #, no-wrap msgid "object files, temporary" msgstr "ficheros objeto, temporal" #. type: Plain text msgid "" "Incidentally, the file mentioned in the error message @file{/tmp/ccbR60jm.o} " "is a temporary object file created by the compiler from @file{calc.c}, in " "order to carry out the linking process." msgstr "" "Casualmente, el fichero mencionado el mensaje de error\n" "@file{/tmp/ccbR60jm.o} es un fichero objeto temporal creado por el\n" "compilador desde @file{calc.es.c}, para llevar a cabo el proceso de\n" "enlace." #. type: Plain text msgid "" "To enable the compiler to link the @code{sqrt} function to the main program " "@file{calc.c} we need to supply the library @file{libm.a}. One obvious but " "cumbersome way to do this is to specify it explicitly on the command line:" msgstr "" "Para permitir que el compilador enlace la funci@'on @code{sqrt} al\n" "programa main de @file{calc.es.c} es necesario proveer la\n" "librer@'{@dotless{i}}a @file{libm.a}. Un obvio pero no convencional\n" "modo de hacer esto es especificarlo de manera expl@'{@dotless{i}}cita\n" "en la l@'{@dotless{i}}nea de comandos:" #. type: example #, no-wrap msgid "$ gcc -Wall calc.c /usr/lib/libm.a -o calc\n" msgstr "$ gcc -Wall calc.es.c /usr/lib/libm.a -o calc\n" #. type: Plain text msgid "" "The library @file{libm.a} contains object files for all the mathematical " "functions, such as @code{sin}, @code{cos}, @code{exp}, @code{log} and @code" "{sqrt}. The linker searches through these to find the object file " "containing the @code{sqrt} function." msgstr "" "La librer@'{@dotless{i}}a @file{libm.a} contiene los ficheros objeto para " "todas las \n" "funciones matem@'aticas, tales como @code{sin}, @code{cos}, @code{exp}, \n" "@code{log} y @code{sqrt}. El enlazador busca a trav@'es de estos para \n" "encontrar el fichero objeto conteniendo la funci@'on @code{sqrt}." #. type: Plain text msgid "" "Once the object file for the @code{sqrt} function has been found, the main " "program can be linked and a complete executable produced:" msgstr "" "Una vez que el fichero objeto para la funci@'on @code{sqrt} fu@'e " "encontrado, \n" "el programa main puede ser enlazado y se produce un ejecutable completo:" #. type: example #, no-wrap msgid "" "$ ./calc \n" "The square root of 2.0 is 1.414214\n" msgstr "" "$ ./calc \n" "La ra@'{@dotless{i}}z cuadrada de 2.000000 es 1.414214\n" #. type: Plain text msgid "" "The executable file includes the machine code for the main function and the " "machine code for the @code{sqrt} function, copied from the corresponding " "object file in the library @file{libm.a}." msgstr "" "El fichero ejecutable incluye el c@'odigo m@'aquina para la funci@'on main \n" "y el c@'odigo m@'aquina para la funci@'on @code{sqrt}, copiado desde\n" "el archivo objeto correspondiente en la librer@'{@dotless{i}}a\n" "@file{libm.a}." #. type: cindex #, no-wrap msgid "linking, with library using @option{-l}" msgstr "enlazando, con librer@'{@dotless{i}}a usando @option{-l}" #. type: cindex #, no-wrap msgid "@option{-l} option, linking with libraries" msgstr "@option{-l}, opci@'on para enlazar con librer@'{@dotless{i}}as" #. type: cindex #, no-wrap msgid "@option{-lm} option, link with math library" msgstr "@option{-lm}, opci@'on de enlace con librer@'{@dotless{i}}a matem@'atica" #. type: cindex #, no-wrap msgid "@option{l} option, linking with libraries" msgstr "@option{l}, opci@'on para enlazar con librer@'{@dotless{i}}as" #. type: cindex #, no-wrap msgid "math library, linking with @option{-lm}" msgstr "librer@'{@dotless{i}}a matem@'atica, enlazando con @option{-lm}" #. type: Plain text msgid "" "To avoid the need to specify long paths on the command line, the compiler " "provides a short-cut option @samp{-l} for linking against libraries. For " "example, the following command," msgstr "" "Para evitar la necesidad de especificar largas rutas en la \n" "l@'{@dotless{i}}nea de comandos, el compilador proporciona una opci@'on \n" "de atajo @samp{-l} para enlazar librer@'{@dotless{i}}as. Por ejemplo, el \n" "siguiente comando," #. type: example #, no-wrap msgid "$ gcc -Wall calc.c -lm -o calc\n" msgstr "$ gcc -Wall calc.es.c -lm -o calc\n" #. type: Plain text msgid "" "is equivalent to the original command above using the full library name @file" "{/usr/lib/libm.a}." msgstr "" "es equivalente al comando original usando el nombre de la \n" "librer@'{@dotless{i}}a completa @file{/usr/lib/libm.a}. " #. type: Plain text msgid "" "In general, the compiler option @option{-l@var{NAME}} will attempt to link " "object files with a library file @file{lib@var{NAME}.a} in the standard " "library directories. Additional directories can specified with command-line " "options and environment variables, to be discussed shortly. A large program " "will typically use many @option{-l} options to link libraries such as the " "math library, graphics libraries and networking libraries." msgstr "" "En general, la opci@'on del compilador @option{-l@var{NAME}} intentar@'a \n" "enlazar ficheros objeto con un fichero de librer@'{@dotless{i}}a \n" "@file{lib@var{NAME}.a} en los directorios de librer@'{@dotless{i}}a \n" "est@'andar. Los directorios adicionales pueden especificarse con opciones \n" "de la l@'{@dotless{i}}nea comandos y variables de entorno, por decirlo \n" "resumidamente. Un programa largo normalmente usar@'a muchas opciones \n" "@option{-l} para enlazar a librer@'{@dotless{i}}as tales como la \n" "librer@'{@dotless{i}}a matem@'atica, librer@'{@dotless{i}}as gr@'aficas y \n" "librer@'{@dotless{i}}as de red." #. type: subsection #, no-wrap msgid "Link order of libraries" msgstr "Orden de enlace de librer@'{@dotless{i}}as" #. type: cindex #, no-wrap msgid "libraries, link order" msgstr "librer@'{@dotless{i}}as, orden de enlace" #. type: cindex #, no-wrap msgid "link order, of libraries" msgstr "orden de enlace, de librer@'{@dotless{i}}as" #. type: cindex #, no-wrap msgid "link order, from left to right" msgstr "orden de enlace, de izquierda a derecha" #. type: Plain text msgid "" "The traditional behavior of linkers is to search for external functions from " "left to right in the libraries specified on the command line. This means " "that a library containing the definition of a function should appear after " "any source files or object files which use it. This includes libraries " "specified with the short-cut @option{-l} option, as shown in the following " "command:" msgstr "" "El comportamiento tradicional de los enlazadores es buscar funciones\n" "externas de izquierda a derecha en las librer@'{@dotless{i}}as\n" "especificadas en la l@'{@dotless{i}}nea de comandos. Esto significa\n" "que una librer@'{@dotless{i}}a que contiene la definici@'on de una\n" "funci@'on deber@'{@dotless{i}}a aparecer despu@'es de cualquier\n" "fichero fuente o ficheros objeto que la usen. Esto incluye\n" "librer@'{@dotless{i}}as especificadas con la opci@'on @option{-l},\n" "como se muestra en el siguiente comando:" #. type: example #, no-wrap msgid "$ gcc -Wall calc.c -lm -o calc @r{(correct order)}\n" msgstr "$ gcc -Wall calc.es.c -lm -o calc @r{(orden correcto)}\n" #. type: Plain text msgid "" "With some linkers the opposite ordering (placing the @option{-lm} option " "before the file which uses it) would result in an error," msgstr "" "Con algunos enlazadores el orden opuesto (poner la opci@'on @option{-lm} \n" "antes del fichero que lo usa) dar@'{@dotless{i}}a como resultado un \n" "error," #. type: example #, no-wrap msgid "" "$ cc -Wall -lm calc.c -o calc @r{(incorrect order)}\n" "main.o: In function `main':\n" "main.o(.text+0xf): undefined reference to `sqrt'\n" msgstr "" "$ cc -Wall -lm calc.es.c -o calc @r{(orden incorrecto)}\n" "main.o: In function `main':\n" "main.o(.text+0xf): undefined reference to `sqrt'\n" #. type: cindex #, no-wrap msgid "error, undefined reference due to library link order" msgstr "error, referencia indefinida debido al orden de enlace de librer@'{@dotless{i}}as" #. type: cindex #, no-wrap msgid "linking, undefined reference error due to library link order" msgstr "enlazado, error de referencia indefinida debido al orden de enlace de librer@'{@dotless{i}}as" #. type: Plain text msgid "" "because there is no library or object file containing @code{sqrt} after @file" "{calc.c}. The option @option{-lm} should appear after the file @file{calc." "c}." msgstr "" "debido a que no hay librer@'{@dotless{i}}a o fichero objeto que \n" "contenga @code{sqrt} despu@'es de @file{calc.es.c}. La opci@'on @option{-" "lm} \n" "deber@'{@dotless{i}}a aparecer despu@'es del fichero @file{calc.es.c}." #. type: Plain text msgid "" "When several libraries are being used, the same convention should be " "followed for the libraries themselves. A library which calls an external " "function defined in another library should appear before the library " "containing the function." msgstr "" "Cuando se usan varias librer@'{@dotless{i}}as, se deber@'{@dotless{i}}a \n" "usar la misma convenci@'on que con las librer@'{@dotless{i}}as en \n" "s@'{@dotless{i}}. Una librer@'{@dotless{i}}a que llama a una funci@'on \n" "externa definida en otra librer@'{@dotless{i}}a deber@'{@dotless{i}}a \n" "aparecer antes que la librer@'{@dotless{i}}a que contiene la funci@'on." #. type: cindex #, no-wrap msgid "ordering of libraries" msgstr "ordenando librer@'{@dotless{i}}as" #. type: Plain text msgid "" "For example, a program @file{data.c} using the GNU Linear Programming " "library @file{libglpk.a}, which in turn uses the math library @file{libm.a}, " "should be compiled as," msgstr "" "Por ejemplo, un programa @file{data.es.c} usando la librer@'{@dotless{i}}a \n" "GNU Linear Programming library @file{libglpk.a}, que a su vez usa la\n" "librer@'{@dotless{i}}a matem@'atica @file{libm.a}, se compila\n" "as@'{@dotless{i}}:" #. type: example #, no-wrap msgid "$ gcc -Wall data.c -lglpk -lm\n" msgstr "$ gcc -Wall data.es.c -lglpk -lm\n" #. type: Plain text msgid "" "since the object files in @file{libglpk.a} use functions defined in @file" "{libm.a}." msgstr "" "debido a que los fichero objetos de @file{libglpk.a} usan funciones \n" "definidas en @file{libm.a}." #. type: Plain text msgid "" "Most current linkers will search all libraries, regardless of order, but " "since some do not do this it is best to follow the convention of ordering " "libraries from left to right." msgstr "" "La mayor@'{@dotless{i}}a de los enlazadores actuales buscar@'an todas\n" "las librer@'{@dotless{i}}as, sin importar el orden, pero debido a que\n" "algunos no hacen esto es mejor seguir la convenci@'on de ordenar las\n" "librer@'{@dotless{i}}as de izquierda a derecha." #. type: Plain text msgid "" "This is worth keeping in mind if you ever encounter unexpected problems with " "undefined references, and all the necessary libraries appear to be present " "on the command line." msgstr "" "Es @'util tener todo esto en mente si se encuentran problemas\n" "inesperados con referencias no definidas, y mirar si todas las\n" "librer@'{@dotless{i}}as necesarias aparecen en la l@'{@dotless{i}}nea\n" "de comandos." #. type: cindex #, no-wrap msgid "header file, missing" msgstr "fichero de cabecera, perdido" #. type: cindex #, no-wrap msgid "declaration, missing" msgstr "declaraci@'on, perdida" #. type: cindex #, no-wrap msgid "missing header files" msgstr "ficheros de cabecera perdidos" #. type: cindex #, no-wrap msgid "library header files, using" msgstr "librer@'{@dotless{i}}a de ficheros de cabecera, usando" #. type: Plain text msgid "" "When using a library it is essential to include the appropriate header " "files, in order to declare the function arguments and return values with the " "correct types. Without declarations, the arguments of a function can be " "passed with the wrong type, causing corrupted results." msgstr "" "Cuando se usa una librer@'{@dotless{i}}a es esencial incluir los\n" "ficheros de cabecera apropiados, para as@'{@dotless{i}} declarar los\n" "argumentos de funciones y devolver valores con los tipos\n" "correctos. Sin declaraciones, los argumentos de una funci@'on pueden\n" "pasar el tipo err@'oneo, causando resultados corruptos. " #. type: Plain text msgid "" "The following example shows another program which makes a function call to " "the C standard library. In this case, the function @code{strtod} is used to " "convert a string @code{\"123\"} to a floating-point number:" msgstr "" "El siguiente ejemplo muestra otro programa que crea una llamada de\n" "funci@'on para la librer@'{@dotless{i}}a est@'andar de C. En este\n" "caso, la funci@'on @code{strtod} es usada para convertir una cadena\n" "@code{\\\"123\\\"} a un n@'umero en coma flotante:" #. type: example #, no-wrap msgid "@verbatiminclude badconv.c\n" msgstr "@verbatiminclude badconv.es.c\n" #. type: Plain text msgid "" "However, the program contains an error---the @code{#include} statement for " "the required header file @file{stdlib.h} is missing, so the prototype @code" "{double strtod (const char * string, char * tail)} given there will not be " "seen by the compiler." msgstr "" "Sin embargo, el programa contiene un error ---la sentencia\n" "@code{#include} para la necesaria cabecera @file{stdlib.h} no se\n" "encuentra, as@'{@dotless{i}} el prototipo @code{double strtod (const\n" "char * string, char * tail)} no ser@'a visto por el compilador." #. type: Plain text msgid "" "Compiling the program without any warning options will produce an executable " "file which gives incorrect results:" msgstr "" "La compilaci@'on del programa sin opciones de aviso producir@'a un fichero \n" "ejecutable que da resultados incorrectos:" #. type: example #, no-wrap msgid "" "$ gcc badconv.c -lm\n" "$ ./a.out\n" "Value is 966656.000000 @r{(incorrect result, should be 123.0)}\n" msgstr "" "$ gcc badconv.es.c -lm\n" "$ ./a.out\n" "El valor es 966656.000000 @r{(resultado incorrecto,\n" "deber@'{@dotless{i}}a ser 123.0)}\n" #. type: Plain text msgid "" "The results are corrupted because the arguments and return value of the call " "to @code{strtod} are passed with incorrect types.@footnote{The actual output " "shown above may differ, depending on the specific platform and environment.} " "This can be detected by turning on the warning option @option{-Wall}:" msgstr "" "Los resultados est@'an corruptos porque los argumento y el valor\n" "devuelto de la llamada a @code{strtod} son pasados con tipos\n" "incorrectos.@footnote{La actual salida anterior puede diferir,\n" "dependiendo de la plataforma y el entorno espec@'{@dotless{i}}ficos.}\n" "Esto puede ser detectado activando la opci@'on de avisos\n" "@option{-Wall}:" #. type: example #, no-wrap msgid "" "$ gcc -Wall badconv.c -lm\n" "badconv.c: In function `main':\n" "badconv.c:6: warning: implicit declaration of \n" " function `strtod'\n" msgstr "" "$ gcc -Wall badconv.es.c -lm\n" "badconv.es.c: In function `main':\n" "badconv.es.c:6: warning: implicit declaration of \n" " function `strtod'\n" #. type: cindex #, no-wrap msgid "implicit declaration of function" msgstr "declaraci@'on impl@'{@dotless{i}}cita de funci@'on" #. type: cindex #, no-wrap msgid "header file, missing header causes implicit declaration" msgstr "fichero de cabecera, la cabecera perdida causa declaraci@'on impl@'{@dotless{i}}cita" #. type: cindex #, no-wrap msgid "missing header file, causes implicit declaration" msgstr "fichero de cabecera perdida, causa declaraci@'on impl@'{@dotless{i}}cita" #. type: Plain text msgid "" "This example shows again the importance of using the warning option @option{-" "Wall} to detect serious problems that could otherwise easily be overlooked." msgstr "" "Este ejemplo muestra de nuevo la importancia de usar la opci@'on de \n" "aviso @option{-Wall} para detectar problemas serios que de otro modo \n" "no podr@'{@dotless{i}}an ser f@'acilmente localizados." #. type: cindex #, no-wrap msgid "compilation, options" msgstr "compilaci@'on, opciones" #. type: cindex #, no-wrap msgid "options, compilation" msgstr "opciones, compilaci@'on" #. type: Plain text msgid "" "This chapter describes other commonly-used compiler options available in " "GCC. These options control features such as the search paths used for " "locating libraries and include files, the use of additional warnings and " "diagnostics, preprocessor macros and C language dialects." msgstr "" "Este cap@'{@dotless{i}}tulo describe otras opciones del compilador \n" "com@'unmente usadas disponibles en GCC. Estas opciones controlan \n" "funcionalidades tales como buscar rutas usadas para localizar \n" "librer@'{@dotless{i}}as e incluir ficheros, el uso de avisos adicionales \n" "y diagn@'osticos, macros del preprocesador y dialectos del lenguaje C." #. type: section #, no-wrap msgid "Setting search paths" msgstr "Asignando rutas de b@'usqueda" #. type: section #, no-wrap msgid "Shared libraries and static libraries" msgstr "Librer@'{@dotless{i}}as compartidas y librer@'{@dotless{i}}as est@'aticas" #. type: section #, no-wrap msgid "C language standards" msgstr "Est@'andares del lenguaje C" #. type: node #, no-wrap msgid "Warning options in -Wall" msgstr "Opciones de aviso en -Wall" #. type: section #, no-wrap msgid "Additional warning options" msgstr "Opciones de aviso adicionales" #. type: section #, no-wrap msgid "Recommended warning options" msgstr "Opciones de aviso recomendadas" #. type: cindex #, no-wrap msgid "search paths" msgstr "rutas de b@'usqueda" #. type: cindex #, no-wrap msgid "paths, search" msgstr "rutas, b@'usqueda" #. type: Plain text msgid "" "In the last chapter, we saw how to link to a program with functions in the C " "math library @file{libm.a}, using the short-cut option @option{-lm} and the " "header file @file{math.h}." msgstr "" "En el @'ultimo cap@'{@dotless{i}}tulo, se vi@'o c@'omo enlazar a un\n" "programa con funciones de la librer@'{@dotless{i}}a matem@'atica\n" "@file{libm.a}, usando la opci@'on de atajo @option{-lm} y el fichero\n" "de cabecera @file{math.h}. " #. type: Plain text msgid "" "A common problem when compiling a program using library header files is the " "error:" msgstr "" "Un problema com@'un cuando se compila un programa usando ficheros de " "cabecera \n" "es el error:" #. type: cindex #, no-wrap msgid "No such file or directory, header file not found" msgstr "No such file or directory, header file not found" #. type: cindex #, no-wrap msgid "header file, not found" msgstr "fichero de cabecera, no encontrado" #. type: example #, no-wrap msgid "@var{FILE.h}: No such file or directory\n" msgstr "@var{FILE.h}: No such file or directory\n" #. type: Plain text msgid "" "This occurs if a header file is not present in the standard include file " "directories used by @code{gcc}. A similar problem can occur for libraries:" msgstr "" "Esto ocurre si un fichero de cabecera no est@'a presente en los " "directorios \n" "de ficheros include est@'andar usados por @code{gcc}. Un problema similar \n" "puede ocurrir en librer@'{@dotless{i}}as:" #. type: cindex #, no-wrap msgid "cannot find @var{library} error" msgstr "cannot find @var{library} error" #. type: cindex #, no-wrap msgid "link error, cannot find library" msgstr "error de enlace, no se puede encontrar librer@'{@dotless{i}}a" #. type: example #, no-wrap msgid "/usr/bin/ld: cannot find @var{library}\n" msgstr "/usr/bin/ld: cannot find @var{library}\n" #. type: Plain text msgid "" "This happens if a library used for linking is not present in the standard " "library directories used by @code{gcc}." msgstr "" "Esto ocurre si una librer@'{@dotless{i}}a usada para enlazar no est@'a \n" "presente en los directorios de librer@'{@dotless{i}}a est@'andar usados \n" "por @code{gcc}." #. type: Plain text msgid "" "By default, @code{gcc} searches the following directories for header files:" msgstr "" "Por defecto, @code{gcc} busca en los siguientes directorios los ficheros " "de \n" "cabecera:" #. type: cindex #, no-wrap msgid "ld: cannot find library error" msgstr "ld: cannot find library error" #. type: cindex #, no-wrap msgid "default directories, linking and header files" msgstr "directorios por defecto, enlazando y ficheros de cabecera" #. type: cindex #, no-wrap msgid "linking, default directories" msgstr "enlazando, directorios por defecto" #. type: cindex #, no-wrap msgid "header file, default directories" msgstr "fichero de cabecera, directorios por defecto" #. type: example #, no-wrap msgid "" "/usr/local/include/\n" "/usr/include/\n" msgstr "" "/usr/local/include/\n" "/usr/include/\n" #. type: Plain text msgid "and the following directories for libraries:" msgstr "y los siguientes directorios para librer@'{@dotless{i}}as:" #. type: example #, no-wrap msgid "" "/usr/local/lib/\n" "/usr/lib/\n" msgstr "" "/usr/local/lib/\n" "/usr/lib/\n" #. type: Plain text msgid "" "The list of directories for header files is often referred to as the @dfn" "{include path}, and the list of directories for libraries as the @dfn" "{library search path} or @dfn{link path}." msgstr "" "La lista de directorios para ficheros de cabecera son referidos con \n" "frecuencia como @dfn{ruta de include}, y la lista de directorios para \n" "librer@'{@dotless{i}}as como @dfn{ruta de b@'usqueda de \n" "librer@'{@dotless{i}}as} o @dfn{ruta de enlace}." #. type: cindex #, no-wrap msgid "libraries, on 64-bit platforms" msgstr "librer@'{@dotless{i}}as, en plataformas de 64 bits" #. type: cindex #, no-wrap msgid "64-bit platforms, additional library directories" msgstr "plataformas de 64 bits, directorios de librer@'{@dotless{i}}a adicionales" #. type: Plain text msgid "" "The directories on these paths are searched in order, from first to last in " "the two lists above.@footnote{The default search paths may also include " "additional system-dependent or site-specific directories, and directories in " "the GCC installation itself. For example, on 64-bit platforms additional " "@file{lib64} directories may also be searched by default.} For example, a " "header file found in @file{/usr/local/include} takes precedence over a file " "with the same name in @file{/usr/include}. Similarly, a library found in " "@file{/usr/local/lib} takes precedence over a library with the same name in " "@file{/usr/lib}." msgstr "" "Los directorios en estas rutas son buscados en orden, desde el primero \n" "hasta el @'ultimo en los dos listados de arriba.@footnote{Las rutas de \n" "b@'usqueda por defecto pueden tambi@'en incluir directorios adicionales y \n" "dependientes del sistema o espec@'{@dotless{i}}ficos del sitio, y\n" "directorios en la instalaci@'on de GCC en s@'{@dotless{i}}. Por\n" "ejemplo, en plataformas de 64 bits directorios adicionales @file{lib64}\n" "pueden tambi@'en ser b@'uscados por defecto.} Por ejemplo, un fichero\n" "de cabecera encontrado en @file{/usr/local/include} precede a un\n" "fichero con el mismo nombre en @file{/usr/include}. De manera similar,\n" "una librer@'{@dotless{i}}a encontrada en @file{/usr/local/lib}\n" "preceder@'a a una librer@'{@dotless{i}}a con el mismo nombre en\n" "@file{/usr/lib}." #. type: cindex #, no-wrap msgid "@option{-L} option, library search path" msgstr "@option{-L}, opci@'on de ruta de b@'usqueda de librer@'{@dotless{i}}a" #. type: cindex #, no-wrap msgid "@option{L} option, library search path" msgstr "@option{L}, opci@'on de ruta de b@'usqueda de librer@'{@dotless{i}}" #. type: cindex #, no-wrap msgid "@option{-I} option, include path" msgstr "@option{-I}, opci@'on para asignar la ruta de include" #. type: cindex #, no-wrap msgid "@option{I} option, include path" msgstr "@option{I}, opci@'on para asignar la ruta de include" #. type: cindex #, no-wrap msgid "libraries, extending search path with @option{-L}" msgstr "librer@'{@dotless{i}}as, extendiendo ruta de b@'usqueda con @option{-L}" #. type: cindex #, no-wrap msgid "include path, extending with @option{-I}" msgstr "ruta de include, extendiendo con @option{-I}" #. type: cindex #, no-wrap msgid "header file, include path---extending with @option{-I}" msgstr "fichero de cabecera, ruta de include ---extendiendo con @option{-I}" #. type: Plain text msgid "" "When additional libraries are installed in other directories it is necessary " "to extend the search paths, in order for the libraries to be found. The " "compiler options @option{-I} and @option{-L} add new directories to the " "beginning of the include path and library search path respectively." msgstr "" "Cuando se instalan librer@'{@dotless{i}}as adicionales en otros " "directorios \n" "es necesario extender las rutas de b@'usqueda, para que las \n" "librer@'{@dotless{i}}as sean encontradas. Las opciones del compilador \n" "@option{-I} y @option{-L} a@~naden nuevos directorios al principio de la \n" "ruta include y la ruta de b@'usqueda de librer@'{@dotless{i}}a \n" "respectivamente." #. type: subsection #, no-wrap msgid "Search path example" msgstr "Ejemplo de ruta de b@'usqueda" #. type: subsection #, no-wrap msgid "Environment variables" msgstr "Variables de entorno" #. type: subsection #, no-wrap msgid "Extended search paths" msgstr "Rutas de b@'usqueda extendidas" #. type: cindex #, no-wrap msgid "search paths, example" msgstr "rutas de b@'usqueda, ejemplo" #. type: cindex #, no-wrap msgid "@code{gdbm}, GNU DBM library" msgstr "@code{gdbm}, GNU DBM library" #. type: cindex #, no-wrap msgid "key-value pairs, stored with GDBM" msgstr "pares clave valor, almacenados con GDBM" #. type: cindex #, no-wrap msgid "DBM file, created with @code{gdbm}" msgstr "fichero DBM, creado con @code{gdbm}" #. type: Plain text msgid "" "The following example program uses a library that might be installed as an " "additional package on a system---the GNU Database Management Library " "(GDBM). The GDBM Library stores key-value pairs in a DBM file, a type of " "data file which allows values to be stored and indexed by a @dfn{key} (an " "arbitrary sequence of characters). Here is the example program @file{dbmain." "c}, which creates a DBM file containing a key @samp{testkey} with the value " "@samp{testvalue}:" msgstr "" "El siguiente programa de ejemplo usa una librer@'{@dotless{i}}a que \n" "podr@'{@dotless{i}}a ser instalada como un paquete adicional en un \n" "sistema ---la GNU Database Management Library (GDBM). La\n" "librer@'{@dotless{i}}a GDBM almacena pares clave:valor en un fichero\n" "DBM, un tipo de fichero de datos que permite que los valores sean\n" "almacenados e indexados por una @dfn{clave} (una arbitraria secuencia\n" "de caracteres). Aqu@'{@dotless{i}} est@'a el programa de ejemplo\n" "@file{dbmain.es.c}, que crea un fichero DBM conteniendo una clave\n" "@samp{clavetest} con el valor @samp{valortest}:" #. type: example #, no-wrap msgid "@verbatiminclude dbmain.c\n" msgstr "@verbatiminclude dbmain.es.c\n" #. type: Plain text msgid "" "The program uses the header file @file{gdbm.h} and the library @file{libgdbm." "a}. If the library has been installed in the default location of @file{/usr/" "local/lib}, with the header file in @file{/usr/local/include}, then the " "program can be compiled with the following simple command:" msgstr "" "El programa usa el fichero de cabecera @file{gdbm.h} y la\n" "librer@'{@dotless{i}}a @file{libgdbm.a}. Si la librer@'{@dotless{i}}a\n" "ha sido instalada en la localizaci@'on por defecto\n" "@file{/usr/local/lib}, con el fichero de cabecera en\n" "@file{/usr/local/include}, entonces el programa puede ser compilado\n" "con el siguiente comando: " #. type: example #, no-wrap msgid "$ gcc -Wall dbmain.c -lgdbm\n" msgstr "$ gcc -Wall dbmain.es.c -lgdbm\n" #. type: Plain text msgid "" "Both these directories are part of the default @code{gcc} include and link " "paths." msgstr "" "Ambos de estos directorios son parte del @code{gcc} por defecto e incluyen \n" "enlaces y rutas." #. type: Plain text msgid "" "However, if GDBM has been installed in a different location, trying to " "compile the program will give the following error:" msgstr "" "Sin embargo, si GDBM ha sido instalado en una localizaci@'on diferente,\n" "al intentar compilar el programa se obtendr@'a el siguiente error:" #. type: example #, no-wrap msgid "" "$ gcc -Wall dbmain.c -lgdbm \n" "dbmain.c:1: gdbm.h: No such file or directory\n" msgstr "" "$ gcc -Wall dbmain.es.c -lgdbm \n" "dbmain.es.c:1: gdbm.h: No such file or directory\n" #. type: Plain text msgid "" "For example, if version 1.8.3 of the GDBM package is installed under the " "directory @file{/opt/gdbm-1.8.3} the location of the header file would be," msgstr "" "Por ejemplo, si la versi@'on 1.8.3 del paquete GDBM est@'a instalada en el \n" "directorio @file{/opt/gdbm-1.8.3} la localizaci@'on del fichero de \n" "cabecera ser@'{@dotless{i}}a," #. type: example #, no-wrap msgid "/opt/gdbm-1.8.3/include/gdbm.h\n" msgstr "/opt/gdbm-1.8.3/include/gdbm.h\n" #. type: Plain text msgid "" "which is not part of the default @code{gcc} include path. Adding the " "appropriate directory to the include path with the command-line option " "@option{-I} allows the program to be compiled, but not linked:" msgstr "" "que no es parte de la ruta include del @code{gcc} por defecto. \n" "A@~nadiendo el directorio apropiado para la ruta include con la \n" "opci@'on @option{-I} en l@'{@dotless{i}}nea de comandos, permite que\n" "el programa se compile, pero no se enlace:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -I/opt/gdbm-1.8.3/include dbmain.c -lgdbm \n" "/usr/bin/ld: cannot find -lgdbm\n" "collect2: ld returned 1 exit status\n" msgstr "" "$ gcc -Wall -I/opt/gdbm-1.8.3/include dbmain.es.c -lgdbm \n" "/usr/bin/ld: cannot find -lgdbm\n" "collect2: ld returned 1 exit status\n" #. type: Plain text msgid "" "The directory containing the library is still missing from the link path. " "It can be added to the link path using the following option:" msgstr "" "El directorio que contiene la librer@'{@dotless{i}}a no est@'a\n" "incluido en la ruta de enlace. @'Este puede ser a@~nadido a la ruta de\n" "enlace usando la siguiente opci@'on:" #. type: example #, no-wrap msgid "-L/opt/gdbm-1.8.3/lib/\n" msgstr "-L/opt/gdbm-1.8.3/lib/\n" #. type: Plain text msgid "" "The following command line allows the program to be compiled and linked:" msgstr "El siguiente comando permite que el programa sea compilado y enlazado:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -I/opt/gdbm-1.8.3/include \n" " -L/opt/gdbm-1.8.3/lib dbmain.c -lgdbm\n" msgstr "" "$ gcc -Wall -I/opt/gdbm-1.8.3/include \n" " -L/opt/gdbm-1.8.3/lib dbmain.es.c -lgdbm\n" #. type: Plain text msgid "" "This produces the final executable linked to the GDBM library. Before " "seeing how to run this executable we will take a brief look at the " "environment variables that affect the @option{-I} and @option{-L} options." msgstr "" "Esto produce el ejecutable final enlazado a la librer@'{@dotless{i}}a\n" "GDBM. Antes de ver como funciona este ejecutable se dar@'a una breve\n" "mirada a las variables de entorno que afecta a las opciones\n" "@option{-I} y @option{-L}." #. type: Plain text msgid "" "Note that you should never place the absolute paths of header files in @code" "{#include} statements in your source code, as this will prevent the program " "from compiling on other systems. The @option{-I} option or the @env" "{INCLUDE_PATH} variable described below should always be used to set the " "include path for header files." msgstr "" "N@'otese que nunca se localizar@'an las rutas absolutas de los ficheros \n" "de cabecera en sentencias @code{#include} en el c@'odigo fuente, ya que \n" "esto evitar@'{@dotless{i}}a que el programa se compilase en otros " "sistemas. \n" "La opci@'on @option{-I} o la variable @env{INCLUDE_PATH} descrita\n" "anteriormente siempre se deber@'{@dotless{i}}a usar para asignar la\n" "ruta include para los ficheros de cabecera." #. type: cindex #, no-wrap msgid "environment variables, for default search paths" msgstr "variables de entorno, por defecto rutas de b@'usqueda" #. type: Plain text msgid "" "The search paths for header files and libraries can also be controlled " "through environment variables in the shell. These may be set automatically " "for each session using the appropriate login file, such as @file{." "bash_profile} in the case of GNU Bash." msgstr "" "La b@'usqueda de rutas para los ficheros de cabecera y librer@'{@dotless{i}}" "as \n" "puede tambi@'en ser controlado a trav@'es de las variables de entorno en " "la \n" "shell. Estas pueden ser asignadas de manera autom@'atica por cada sesi@'on \n" "usando el apropiado fichero de acceso, tal como @file{.bash_profile} en el \n" "caso de GNU Bash." #. type: cindex #, no-wrap msgid "@code{bash} profile file, login settings" msgstr "fichero @code{bash} profile, configuraciones de login" #. type: cindex #, no-wrap msgid "include path, setting with environment variables" msgstr "ruta include, asignaci@'on con variables de entorno" #. type: cindex #, no-wrap msgid "C include path" msgstr "ruta include de C" #. type: cindex #, no-wrap msgid "C++ include path" msgstr "ruta include de C++" #. type: cindex #, no-wrap msgid "@env{C_INCLUDE_PATH}" msgstr "@env{C_INCLUDE_PATH}" #. type: cindex #, no-wrap msgid "@env{CPLUS_INCLUDE_PATH}" msgstr "@env{CPLUS_INCLUDE_PATH}" #. type: Plain text msgid "" "Additional directories can be added to the include path using the " "environment variable @env{C_INCLUDE_PATH} (for C header files) or @env" "{CPLUS_INCLUDE_PATH} (for C++ header files). For example, the following " "commands will add @file{/opt/gdbm-1.8.3/include} to the include path when " "compiling C programs:" msgstr "" "Los directorios adicionales pueden ser a@~nadidos para la ruta include \n" "usando la variable de entorno @env{C_INCLUDE_PATH} (para ficheros de " "cabecera \n" "de C). Por ejemplo, los siguientes comandos a@~nadir@'an \n" "@file{/opt/gdbm-1.8.3/include} a la ruta include cuando se compilan " "programas \n" "C:" #. type: example #, no-wrap msgid "" "$ C_INCLUDE_PATH=/opt/gdbm-1.8.3/include \n" "$ export C_INCLUDE_PATH\n" msgstr "" "$ C_INCLUDE_PATH=/opt/gdbm-1.8.3/include \n" "$ export C_INCLUDE_PATH\n" #. type: Plain text msgid "and similarly for C++ programs:" msgstr "y de manera similar para programas C++:" #. type: example #, no-wrap msgid "" "$ CPLUS_INCLUDE_PATH=/opt/gdbm-1.8.3/include \n" "$ export CPLUS_INCLUDE_PATH\n" msgstr "" "$ CPLUS_INCLUDE_PATH=/opt/gdbm-1.8.3/include \n" "$ export CPLUS_INCLUDE_PATH\n" #. type: Plain text msgid "" "This directory will be searched after any directories specified on the " "command line with the option @option{-I}, and before the standard default " "directories (such as @file{/usr/local/include} and @file{/usr/include}). " "The shell command @code{export} is needed to make the environment variable " "available to programs outside the shell itself, such as the compiler---it is " "only needed once for each variable in each shell session, and can also be " "set in the appropriate login file.@footnote{In GNU Bash, the shorter form " "@code{export @var{VARIABLE}=@var{VALUE}} is also allowed.}" msgstr "" "Este directorio ser@'a buscado despu@'es de cualquier directorio\n" "especificado en el comando con la opci@'on @option{-I}, y antes de los\n" "directorios est@'andar por defecto (tales como\n" "@file{/usr/local/include} y @file{/usr/include}). El comando de shell\n" "@code{export} es necesario para crear la variable de entorno\n" "disponible a programas fuera de la shell en s@'{@dotless{i}}, tales\n" "como el compilador ---es solo necesario unavez por cada variable en\n" "cada sesi@'on de shell, y tambi@'en puede ser asignado en el apropiado\n" "fichero de login.@footnote{En GNU Bash, la forma corta @code{export\n" "@var{VARIABLE}=@var{VALOR}} tambi@'en se permite.}" #. type: Plain text msgid "" "Similarly, additional directories can be added to the link path using the " "environment variable @env{LIBRARY_PATH}. For example, the following " "commands will add @file{/opt/gdbm-1.8.3/lib} to the link path:" msgstr "" "De manera similar, directorios adicionales pueden ser a@~nadidos a la \n" "ruta de enlace usando la variable de entorno @env{LIBRARY_PATH}. Por \n" "ejemplo, los siguientes comandos a@~nadir@'an @file{/opt/gdbm-1.8.3/lib} \n" "a la ruta de enlace." #. type: cindex #, no-wrap msgid "link path, setting with environment variable" msgstr "ruta de enlace, asignaci@'on con variable de entorno" #. type: example #, no-wrap msgid "" "$ LIBRARY_PATH=/opt/gdbm-1.8.3/lib\n" "$ export LIBRARY_PATH\n" msgstr "" "$ LIBRARY_PATH=/opt/gdbm-1.8.3/lib\n" "$ export LIBRARY_PATH\n" #. type: Plain text msgid "" "This directory will be searched after any directories specified on the " "command line with the option @option{-L}, and before the standard default " "directories (such as @file{/usr/local/lib} and @file{/usr/lib})." msgstr "" "Este directorio ser@'a buscado despu@'es de que cualquier directorio \n" "especificado en la l@'{@dotless{i}}nea de comandos con la opci@'on \n" "@option{-L}, y antes que los directorios est@'andar por defecto (tales \n" "como @file{/usr/local/lib} y @file{/usr/lib})." #. type: Plain text msgid "" "With the environment variable settings given above the program @file{dbmain." "c} can be compiled without the @option{-I} and @option{-L} options," msgstr "" "Con las configuraciones de las variables de entorno dadas arriba el \n" "programa @file{dbmain.es.c} puede ser compilado sin las opciones @option{-" "I} \n" "y @option{-L}," #. type: Plain text msgid "" "because the default paths now use the directories specified in the " "environment variables @env{C_INCLUDE_PATH} and @env{LIBRARY_PATH}. The same " "compilation command with @code{g++} would use the environment variables @env" "{CPLUS_INCLUDE_PATH} and @env{LIBRARY_PATH}." msgstr "" "porque la rutas por defecto ahora usan los directorios especificados en " "las \n" "variables de entorno @env{C_INCLUDE_PATH} y @env{LIBRARY_PATH}. El mismo \n" "comando de compilaci@'on con @code{g++} deber@'{@dotless{i}}a usar las \n" "variables de entorno @env{CPLUS_INCLUDE_PATH} y @env{LIBRARY_PATH}." #. type: cindex #, no-wrap msgid "multiple directories, on include and link paths" msgstr "m@'ultiples directorios, al incluir y rutas de enlace" #. type: cindex #, no-wrap msgid "extended search paths, for include and link directories" msgstr "rutas de b@'usqueda extendida, para incluir y directorios de enlace" #. type: cindex #, no-wrap msgid "search paths, extended" msgstr "rutas de b@'usqueda, extendida" #. type: Plain text msgid "" "Following the standard Unix convention for search paths, several directories " "can be specified together in an environment variable as a colon separated " "list:" msgstr "" "Siguiendo la convenci@'on est@'andar de Unix para la b@'usqueda de\n" "rutas, varios directorios pueden ser especificados en una variable de\n" "entorno como una lista cuyos elementos se separan con el car@'acter\n" "dos puntos `:':" #. type: example #, no-wrap msgid "@var{DIR1}:@var{DIR2}:@var{DIR3}:...\n" msgstr "@var{DIR1}:@var{DIR2}:@var{DIR3}:...\n" #. type: Plain text msgid "" "The directories are then searched in order from left to right. A single dot " "@samp{.} can be used to specify the current directory.@footnote{The current " "directory can also be specified using an empty path element. For example, " "@code{:@var{DIR1}:@var{DIR2}} is equivalent to @code{.:@var{DIR1}:@var" "{DIR2}}.}" msgstr "" "Los directorios son buscados de izquierda a derecha. Un punto simple @samp" "{.} \n" "puede ser usado para especificar el directorio actual.@footnote{El " "directorio \n" "actual tambi@'en puede ser especificado usando una ruta\n" "vac@'{@dotless{i}}a. Por ejemplo, @code{:@var{DIR1}:@var{DIR2}} es\n" "equivalente a @code{.:@var{DIR1}:@var{DIR2}}.} " #. type: Plain text msgid "" "For example, the following settings create default include and link paths " "for packages installed in the current directory @file{.} and the @file" "{include} and @file{lib} directories under @file{/opt/gdbm-1.8.3} and @file{/" "net} respectively:" msgstr "" "Por ejemplo, la siguiente configuraci@'on crea un include por defecto\n" "y enlaza rutas para paquetes instalados en el directorio actual\n" "@file{.} y en los directorios @file{include} y @file{lib} bajo\n" "@file{/opt/gdbm-1.8.3} y @file{/net} respectivamente:" #. type: example #, no-wrap msgid "" "$ C_INCLUDE_PATH=.:/opt/gdbm-1.8.3/include:/net/include\n" "$ LIBRARY_PATH=.:/opt/gdbm-1.8.3/lib:/net/lib\n" msgstr "" "$ C_INCLUDE_PATH=.:/opt/gdbm-1.8.3/include:/net/include\n" "$ LIBRARY_PATH=.:/opt/gdbm-1.8.3/lib:/net/lib\n" #. type: Plain text msgid "" "For C++ programs, use the environment variable @env{CPLUS_INCLUDE_PATH} " "instead of @env{C_INCLUDE_PATH}." msgstr "" "Para programas C++, se usa la variable de entorno\n" "@env{CPLUS_INCLUDE_PATH} en vez de @env{C_INCLUDE_PATH}." #. type: Plain text msgid "" "To specify multiple search path directories on the command line, the options " "@option{-I} and @option{-L} can be repeated. For example, the following " "command," msgstr "" "Para especificar m@'ultiples rutas de b@'usqueda en la\n" "l@'{@dotless{i}}nea de comandos, las opciones @option{-I} y\n" "@option{-L} pueden ser repetidas. Por ejemplo, el siguiente comando," #. type: example #, no-wrap msgid "" "$ gcc -I. -I/opt/gdbm-1.8.3/include -I/net/include\n" " -L. -L/opt/gdbm-1.8.3/lib -L/net/lib .....\n" msgstr "" "$ gcc -I. -I/opt/gdbm-1.8.3/include -I/net/include\n" " -L. -L/opt/gdbm-1.8.3/lib -L/net/lib .....\n" #. type: Plain text msgid "is equivalent to the environment variable settings given above." msgstr "" "es equivalente a las configuraciones en la variable de entornos dadas \n" "anteriormente." #. type: Plain text msgid "" "When environment variables and command-line options are used together the " "compiler searches the directories in the following order:" msgstr "" "Cuando las variables de entorno y las opciones de comandos son usados\n" "juntos el compilador busca los directorios en el siguiente orden:" #. type: item #, no-wrap msgid "command-line options @option{-I} and @option{-L}, from left to right" msgstr "opciones de comandos @option{-I} y @option{-L}, de izquierda a derecha" #. type: item #, no-wrap msgid "directories specified by environment variables, such as @env{C_INCLUDE_PATH} (for C programs), @env{CPLUS_INCLUDE_PATH} (for C++ programs) and @env{LIBRARY_PATH}" msgstr "" "directorios especificados por variables de entornos, tales como \n" "@env{C_INCLUDE_PATH} (para programas C), @env{CPLUS_INCLUDE_PATH}\n" "(para programas C++) y @env{LIBRARY_PATH}" #. type: item #, no-wrap msgid "default system directories" msgstr "directorios de sistema por defecto" #. type: Plain text msgid "" "In day-to-day usage, directories are usually added to the search paths with " "the options @option{-I} and @option{-L}." msgstr "" "En el uso del d@'{@dotless{i}}a a d@'{@dotless{i}}a, los directorios\n" "son normalmente a@~nadidos a rutas de b@'usqueda con las opciones \n" "@option{-I} y @option{-L}." #. type: cindex #, no-wrap msgid "shared libraries" msgstr "librer@'{@dotless{i}}as compartidas" #. type: cindex #, no-wrap msgid "static libraries" msgstr "librer@'{@dotless{i}}as est@'aticas" #. type: Plain text msgid "" "Although the example program above has been successfully compiled and " "linked, a final step is needed before being able to load and run the " "executable file." msgstr "" "Aunque el programa de ejemplo de arriba ha sido exitosamente compilado\n" "y enlazado, es necesario un paso final antes de ser capaz de cargar y\n" "ejecutar el fichero ejecutable." #. type: Plain text msgid "" "If an attempt is made to start the executable directly, the following error " "will occur on most systems:" msgstr "" "En un intento por iniciar la ejecuci@'on directamente, suceder@'a el\n" "siguiente error en la mayor@'{@dotless{i}}a de los sistemas:" #. type: cindex #, no-wrap msgid "error while loading shared libraries" msgstr "error while loading shared libraries" #. type: cindex #, no-wrap msgid "cannot open shared object file" msgstr "cannot open shared object file" #. type: cindex #, no-wrap msgid "shared libraries, error while loading" msgstr "librer@'{@dotless{i}}as compartidas, error al cargarse" #. type: cindex #, no-wrap msgid "libraries, error while loading shared library" msgstr "librer@'{@dotless{i}}as, error al cargar librer@'{@dotless{i}}a compartida" #. type: example #, no-wrap msgid "" "$ ./a.out\n" "./a.out: error while loading shared libraries:\n" "libgdbm.so.3: cannot open shared object file:\n" "No such file or directory\n" msgstr "" "$ ./a.out\n" "./a.out: error while loading shared libraries:\n" "libgdbm.so.3: cannot open shared object file:\n" "No such file or directory\n" #. type: Plain text msgid "" "This is because the GDBM package provides a @dfn{shared library}. This type " "of library requires special treatment---it must be loaded from disk before " "the executable will run." msgstr "" "Esto es porque el paquete GDBM proporciona una\n" "@dfn{librer@'{@dotless{i}}a compartida}. Este tipo de\n" "librer@'{@dotless{i}}a requiere un tratamiento especial ---debe ser\n" "cargada desde disco antes de que el ejecutable cargue." #. type: Plain text msgid "" "External libraries are usually provided in two forms: @dfn{static libraries} " "and @dfn{shared libraries}. Static libraries are the @file{.a} files seen " "earlier. When a program is linked against a static library, the machine " "code from the object files for any external functions used by the program is " "copied from the library into the final executable." msgstr "" "Las librer@'{@dotless{i}}as externas se proveen normalmente de dos\n" "formas: @dfn{librer@'{@dotless{i}}as est@'aticas} y\n" "@dfn{librer@'{@dotless{i}}as compartidas}. Las librer@'{@dotless{i}}as\n" "est@'aticas son los ficheros @file{.a} vistos antes. Cuando un\n" "programa es enlazado a una librer@'{@dotless{i}}a est@'atica, el\n" "c@'odigo m@'aquina de los ficheros objetos para cualquier funci@'on\n" "externa usada por el programa es copiado desde la\n" "librer@'{@dotless{i}}a al ejecutable final." #. type: cindex #, no-wrap msgid "@code{.so}, shared object file extension" msgstr "@code{.so}, extensi@'on de fichero objeto compartido" #. type: cindex #, no-wrap msgid "@code{so}, shared object file extension" msgstr "@code{so}, extensi@'on de fichero objeto compartido" #. type: cindex #, no-wrap msgid "extension, @code{.so} shared object file" msgstr "extensi@'on, fichero objeto compartido @code{.so}" #. type: cindex #, no-wrap msgid "file extension, @code{.so} shared object file" msgstr "extensi@'on de fichero, fichero objeto compartido @code{.so}" #. type: cindex #, no-wrap msgid "shared object file, @code{.so} extension" msgstr "fichero objeto compartido, extensi@'on @code{.so}" #. type: cindex #, no-wrap msgid "dynamically linked library, see shared libraries" msgstr "librer@'{@dotless{i}}a din@'amicamente enlazada, ver librer@'{@dotless{i}}as compartidas" #. type: cindex #, no-wrap msgid "DLL (dynamically linked library), see shared libraries" msgstr "DLL (dynamically linked library), ver librer@'{@dotless{i}}as compartidas" #. type: Plain text msgid "" "Shared libraries are handled with a more advanced form of linking, which " "makes the executable file smaller. They use the extension @file{.so}, which " "stands for @dfn{shared object}." msgstr "" "Las librer@'{@dotless{i}}as compartidas son manejadas con una forma\n" "m@'as avanzada de enlace, que crea el fichero ejecutable m@'as\n" "peque@~no. Ellas usan la extensi@'on @file{.so}, soportado por los\n" "@dfn{objetos compartidos}." #. type: cindex #, no-wrap msgid "loader function" msgstr "funci@'on de carga" #. type: cindex #, no-wrap msgid "dynamic loader" msgstr "carga din@'amica" #. type: cindex #, no-wrap msgid "linking, dynamic (shared libraries)" msgstr "enlazando, din@'amicamente (librer@'{@dotless{i}}as compartidas)" #. type: Plain text msgid "" "An executable file linked against a shared library contains only a small " "table of the functions it requires, instead of the complete machine code " "from the object files for the external functions. Before the executable " "file starts running, the machine code for the external functions is copied " "into memory from the shared library file on disk by the operating system---a " "process referred to as @dfn{dynamic linking}." msgstr "" "Un fichero ejecutable enlazado a una librer@'{@dotless{i}}a compartida\n" "contiene solo una peque@~na parte de las funciones requeridas, en vez\n" "del c@'odigo m@'aquina completo de los ficheros para las funciones\n" "externas. Antes de que el fichero ejecutable empiece su ejecuci@'on,\n" "el c@'odigo m@'aquina de las funciones externas es copiado en memoria\n" "desde el fichero de la librer@'{@dotless{i}}a compartida por el\n" "sistema operativo ---un proceso referido como @dfn{enlace din@'amico}." #. type: cindex #, no-wrap msgid "shared libraries, advantages of" msgstr "librer@'{@dotless{i}}as compartidas, ventajas de" #. type: cindex #, no-wrap msgid "disk space, reduced usage by shared libraries" msgstr "espacio en disco, uso reducido por librer@'{@dotless{i}}as compartidas" #. type: Plain text msgid "" "Dynamic linking makes executable files smaller and saves disk space, because " "one copy of a library can be shared between multiple programs. Most " "operating systems also provide a virtual memory mechanism which allows one " "copy of a shared library in physical memory to be used by all running " "programs, saving memory as well as disk space." msgstr "" "El enlace din@'amico crea ficheros ejecutables peque@~nos y reserva\n" "espacio en disco, porque una copia de una librer@'{@dotless{i}}a puede\n" "ser compartida entre m@'ultiples programas. En la\n" "mayor@'{@dotless{i}}a de los sistemas operativos tambi@'en se\n" "proporciona un mecanismo de memoria virtual que permite que una copia\n" "de una librer@'{@dotless{i}}a compartida en memoria\n" "f@'{@dotless{i}}sica sea usada por todos los programas en ejecuci@'on,\n" "ahorrando tanto memoria como espacio en disco." #. type: Plain text msgid "" "Furthermore, shared libraries make it possible to update a library without " "recompiling the programs which use it (provided the interface to the library " "does not change)." msgstr "" "Adem@'as, las librer@'{@dotless{i}}as compartidas hacen posible\n" "actualizar una librer@'{@dotless{i}}a sin recompilar los programas que\n" "ella usa (la interfaz dada a la librer@'{@dotless{i}}a no cambia)." #. type: Plain text msgid "" "Because of these advantages @code{gcc} compiles programs to use shared " "libraries by default on most systems, if they are available. Whenever a " "static library @file{lib@var{NAME}.a} would be used for linking with the " "option @option{-l@var{NAME}} the compiler first checks for an alternative " "shared library with the same name and a @file{.so} extension." msgstr "" "Por estas ventajas @code{gcc} compila programas para usar\n" "librer@'{@dotless{i}}as compartidas por defecto en la\n" "mayor@'{@dotless{i}}a de los sistemas, si @'estas est@'an\n" "disponibles. Siempre y cuando una librer@'{@dotless{i}}a est@'atica\n" "@file{lib@var{NAME}.a} sea usada para enlazarse con la opci@'on\n" "@option{-l@var{NAME}} el compilador primero busca una\n" "librer@'{@dotless{i}}a compartida alternativa con el mismo nombre y\n" "una extensi@'on @file{.so}." #. type: Plain text msgid "" "In this case, when the compiler searches for the @file{libgdbm} library in " "the link path, it finds the following two files in the directory @file{/opt/" "gdbm-1.8.3/lib}:" msgstr "" "En este caso, cuando el compilador busca la librer@'{@dotless{i}}a\n" "@file{libgdbm} en la ruta de enlace, @'este encuentra los dos ficheros\n" "siguientes en el directorio @file{/opt/gdbm-1.8.3/lib}:" #. type: example #, no-wrap msgid "" "$ cd /opt/gdbm-1.8.3/lib\n" "$ ls libgdbm.*\n" "libgdbm.a libgdbm.so\n" msgstr "" "$ cd /opt/gdbm-1.8.3/lib\n" "$ ls libgdbm.*\n" "libgdbm.a libgdbm.so\n" #. type: Plain text msgid "" "Consequently, the @file{libgdbm.so} shared object file is used in preference " "to the @file{libgdbm.a} static library." msgstr "" "Por consiguiente, el fichero del objeto compartido @file{libgdbm.so}\n" "es usado de manera preferente a la librer@'{@dotless{i}}a est@'atica\n" "@file{libgdbm.a}." #. type: cindex #, no-wrap msgid "@option{-rpath} option, set run-time shared library search path" msgstr "@option{-rpath}, opci@'on para asignar ruta de b@'usqueda de librer@'{@dotless{i}}a compartida en tiempo de ejecuci@'on" #. type: cindex #, no-wrap msgid "@option{rpath} option, set run-time shared library search path" msgstr "@option{rpath}, opci@'on para asignar ruta de b@'usqueda de librer@'{@dotless{i}}a compartida en tiempo de ejecuci@'on" #. type: Plain text msgid "" "However, when the executable file is started its loader function must find " "the shared library in order to load it into memory. By default the loader " "searches for shared libraries only in a predefined set of system " "directories, such as @file{/usr/local/lib} and @file{/usr/lib}. If the " "library is not located in one of these directories it must be added to the " "load path.@footnote{Note that the directory containing the shared library " "can, in principle, be stored (``hard-coded'') in the executable itself using " "the linker option @option{-rpath}, but this is not usually done since it " "creates problems if the library is moved or the executable is copied to " "another system.}" msgstr "" "Sin embargo, cuando el fichero ejecutable es iniciado su funci@'on de\n" "carga, debe encontrar la librer@'{@dotless{i}}a compartida para\n" "cargarlo en memoria. Por defecto el cargador busca\n" "librer@'{@dotless{i}}as compartidas s@'olo en un conjunto predefinido\n" "de directorios de sistema tales como @file{/usr/local/lib} y\n" "@file{/usr/lib}. Si la librer@'{@dotless{i}}a no est@'a localizada en\n" "uno de estos directorios debe ser a@~nadida a la ruta de\n" "carga.@footnote{N@'otese que el directorio que contiene la\n" "librer@'{@dotless{i}}a compartida puede, en principio, ser guardado\n" "(``hard-coded'') en el propio ejecutable usando la opci@'on del\n" "enlazador @option{-rpath}, pero esto no es hecho normalmente debido a\n" "que da problemas si la librer@'{@dotless{i}}a se ha movido o el\n" "ejecutable est@'a copiado a otro sistema.}" #. type: cindex #, no-wrap msgid "@env{LD_LIBRARY_PATH}, shared library load path" msgstr "@env{LD_LIBRARY_PATH}, ruta de carga de librer@'{@dotless{i}}a compartida" #. type: cindex #, no-wrap msgid "shared libraries, setting load path" msgstr "librer@'{@dotless{i}}as compartidas, asignando ruta de carga" #. type: Plain text msgid "" "The simplest way to set the load path is through the environment variable " "@env{LD_LIBRARY_PATH}. For example, the following commands set the load " "path to @file{/opt/gdbm-1.8.3/lib} so that @file{libgdbm.so} can be found:" msgstr "" "El camino m@'as simple para definir la ruta de carga es a trav@'es de\n" "la variable de entorno @env{LD_LIBRARY_PATH}. Por ejemplo, los\n" "comandos siguientes definen la ruta de carga a\n" "@file{/opt/gdbm-1.8.3/lib} y as@'{@dotless{i}} el fichero\n" "@file{libgdbm.so} puede ser encontrado:" #. type: example #, no-wrap msgid "" "$ LD_LIBRARY_PATH=/opt/gdbm-1.8.3/lib\n" "$ export LD_LIBRARY_PATH\n" "$ ./a.out\n" "Storing key-value pair... done.\n" msgstr "" "$ LD_LIBRARY_PATH=/opt/gdbm-1.8.3/lib\n" "$ export LD_LIBRARY_PATH\n" "$ ./a.out\n" "Almacenado el par clave-valor... hecho.\n" #. type: Plain text msgid "" "The executable now runs successfully, prints its message and creates a DBM " "file called @file{test} containing the key-value pair @samp{testkey} and " "@samp{testvalue}." msgstr "" "El ejecutable ahora funciona bien, imprime su mensaje y crea un\n" "fichero DBM llamado @file{test} conteniendo el par clave:valor\n" "@samp{clavetest} y @samp{valortest}." #. type: cindex #, no-wrap msgid "environment variables, setting permanently" msgstr "variables de entorno, asignaci@'on permanente" #. type: cindex #, no-wrap msgid "shell variables, setting permanently" msgstr "variables shell, asignaci@'on permanente" #. type: cindex #, no-wrap msgid "login file, setting environment variables in" msgstr "fichero de login, asignando variables de entorno en @'el" #. type: cindex #, no-wrap msgid "profile file, setting environment variables in" msgstr "fichero profile, asignando variables de entorno en @'el" #. type: Plain text msgid "" "To save typing, the @env{LD_LIBRARY_PATH} environment variable can be set " "automatically for each session using the appropriate login file, such as " "@file{.bash_profile} for the GNU Bash shell." msgstr "" "Para ahorrar escritura, la variable de entorno @env{LD_LIBRARY_PATH}\n" "puede ser definida de forma autom@'atica por cada sesi@'on usando el\n" "apropiado fichero de login, tal como @file{.bash_profile} para la\n" "shell GNU Bash." #. type: Plain text msgid "" "Several shared library directories can be placed in the load path, as a " "colon separated list @code{@var{DIR1}:@var{DIR2}:@var{DIR3}:...:@var" "{DIRN}}. For example, the following command sets the load path to use the " "@file{lib} directories under @file{/opt/gdbm-1.8.3} and @file{/opt/gtk-1.4}:" msgstr "" "Varios directorios de librer@'{@dotless{i}}as compartidas pueden ser\n" "fijadas en la ruta de carga, como una lista separada por dos puntos\n" "@code{@var{DIR1}:@var{DIR2}:@var{DIR3}:...:@var{DIRN}}. Por ejemplo,\n" "el siguiente comando define la ruta de carga para usar los directorios\n" "@file{lib} bajo @file{/opt/gdbm-1.8.3} y @file{/opt/gtk-1.4}:" #. type: cindex #, no-wrap msgid "environment variables, extending an existing path" msgstr "variables de entorno, extendiendo una ruta existente" #. type: cindex #, no-wrap msgid "paths, extending environment variable" msgstr "rutas, extendiendo la variable de entorno" #. type: example #, no-wrap msgid "" "$ LD_LIBRARY_PATH=/opt/gdbm-1.8.3/lib:/opt/gtk-1.4/lib\n" "$ export LD_LIBRARY_PATH\n" msgstr "" "$ LD_LIBRARY_PATH=/opt/gdbm-1.8.3/lib:/opt/gtk-1.4/lib\n" "$ export LD_LIBRARY_PATH\n" #. type: Plain text msgid "" "If the load path contains existing entries, it can be extended using the " "syntax @code{LD_LIBRARY_PATH=@var{NEWDIRS}:$LD_LIBRARY_PATH}. For example, " "the following command adds the directory @file{/opt/gsl-1.5/lib} to the load " "path shown above:" msgstr "" "Si la ruta de carga contiene entradas existentes, puede ser extendida\n" "usando la sintaxis\n" "@code{LD_LIBRARY_PATH=@var{NEWDIRS}:$LD_LIBRARY_PATH}. Por ejemplo, el\n" "siguiente comando a@~nade el directorio @file{/opt/gsl-1.5/lib} a la\n" "ruta mostrada arriba:" #. type: example #, no-wrap msgid "" "$ LD_LIBRARY_PATH=/opt/gsl-1.5/lib:$LD_LIBRARY_PATH\n" "$ echo $LD_LIBRARY_PATH\n" "/opt/gsl-1.5/lib:/opt/gdbm-1.8.3/lib:/opt/gtk-1.4/lib\n" msgstr "" "$ LD_LIBRARY_PATH=/opt/gsl-1.5/lib:$LD_LIBRARY_PATH\n" "$ echo $LD_LIBRARY_PATH\n" "/opt/gsl-1.5/lib:/opt/gdbm-1.8.3/lib:/opt/gtk-1.4/lib\n" #. type: Plain text msgid "" "It is possible for the system administrator to set the @env{LD_LIBRARY_PATH} " "variable for all users, by adding it to a default login script, such as @file" "{/etc/profile}. On GNU systems, a system-wide path can also be defined in " "the loader configuration file @file{/etc/ld.so.conf}." msgstr "" "Para el administrador de sistemas es posible definir la variables\n" "@env{LD_LIBRARY_PATH} para todos los usuarios, a@~nadi@'endola al\n" "script de login por defecto, normalmente @file{/etc/profile}. En\n" "sistemas GNU, una ruta de sistema puede ser tambi@'en definida en el\n" "fichero de configuraci@'on del cargador @file{/etc/ld.so.conf}." #. type: cindex #, no-wrap msgid "loader configuration file, @code{ld.so.conf}" msgstr "fichero de configuraci@'on del cargador, @code{ld.so.conf}" #. type: cindex #, no-wrap msgid "@code{ld.so.conf}, loader configuration file" msgstr "@code{ld.so.conf}, fichero de configuraci@'on del cargador" #. type: cindex #, no-wrap msgid "@option{-static} option, force static linking" msgstr "@option{-static}, opci@'on que fuerza el enlace est@'atico" #. type: cindex #, no-wrap msgid "@option{static} option, force static linking" msgstr "@option{static}, opci@'on que fuerza el enlace est@'atico" #. type: cindex #, no-wrap msgid "static linking, forcing with @option{-static}" msgstr "enlazando est@'aticamente, se fuerza con @option{-static}" #. type: Plain text msgid "" "Alternatively, static linking can be forced with the @option{-static} option " "to @code{gcc} to avoid the use of shared libraries:" msgstr "" "De manera alternativa, el enlace est@'atico puede ser forzado con la\n" "opci@'on @option{-static} de @code{gcc} para evitar el uso de\n" "librer@'{@dotless{i}}as compartidas:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -static -I/opt/gdbm-1.8.3/include/ \n" " -L/opt/gdbm-1.8.3/lib/ dbmain.c -lgdbm\n" msgstr "" "$ gcc -Wall -static -I/opt/gdbm-1.8.3/include/ \n" " -L/opt/gdbm-1.8.3/lib/ dbmain.es.c -lgdbm\n" #. type: Plain text msgid "" "This creates an executable linked with the static library @file{libgdbm.a} " "which can be run without setting the environment variable @env" "{LD_LIBRARY_PATH} or putting shared libraries in the default directories:" msgstr "" "Esto crea un ejecutable enlazado con la librer@'{@dotless{i}}a\n" "est@'atica @file{libgdbm.a} que puede ser ejecutada sin asignar la\n" "variable de entorno @env{LD_LIBRARY_PATH} o poniendo\n" "librer@'{@dotless{i}}as compartidas en los directorios por defecto:" #. type: example #, no-wrap msgid "" "$ ./a.out\n" "Storing key-value pair... done.\n" msgstr "" "$ ./a.out\n" "Almacenando el par clave-valor... hecho.\n" #. type: Plain text msgid "" "As noted earlier, it is also possible to link directly with individual " "library files by specifying the full path to the library on the command " "line. For example, the following command will link directly with the static " "library @file{libgdbm.a}," msgstr "" "Como ya se coment@'o, tambi@'en es posible enlazar directamente con\n" "librer@'{@dotless{i}}as de ficheros individuales especificando la ruta\n" "completa a la librer@'{@dotless{i}}a en la l@'{@dotless{i}}nea de\n" "comandos. Por ejemplo, el siguiente comando enlazar@'a directamente\n" "con la librer@'{@dotless{i}}a est@'atica @file{libgdbm.a}," #. type: example #, no-wrap msgid "" "$ gcc -Wall -I/opt/gdbm-1.8.3/include \n" " dbmain.c /opt/gdbm-1.8.3/lib/libgdbm.a\n" msgstr "" "$ gcc -Wall -I/opt/gdbm-1.8.3/include \n" " dbmain.es.c /opt/gdbm-1.8.3/lib/libgdbm.a\n" #. type: Plain text msgid "" "and the command below will link with the shared library file @file{libgdbm." "so}:" msgstr "" "y el comando de abajo enlazar@'a con el fichero de\n" "librer@'{@dotless{i}}a compartida @file{libgdbm.so}:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -I/opt/gdbm-1.8.3/include \n" " dbmain.c /opt/gdbm-1.8.3/lib/libgdbm.so\n" msgstr "" "$ gcc -Wall -I/opt/gdbm-1.8.3/include \n" " dbmain.es.c /opt/gdbm-1.8.3/lib/libgdbm.so\n" #. type: Plain text msgid "" "In the latter case it is still necessary to set the library load path when " "running the executable." msgstr "" "En el @'ultimo caso a@'un es necesario definir la ruta de carga de\n" "librer@'{@dotless{i}}a cuando se ejecuta el ejecutable." #. type: cindex #, no-wrap msgid "C language, dialects of" msgstr "lenguaje C, dialectos de" #. type: cindex #, no-wrap msgid "dialects of C language" msgstr "dialectos del lenguaje C" #. type: cindex #, no-wrap msgid "ANSI/ISO C, compared with GNU C extensions" msgstr "ANSI/ISO C, comparado con extensiones GNU C" #. type: cindex #, no-wrap msgid "ISO C, compared with GNU C extensions" msgstr "ISO C, comparado con extensiones GNU C" #. type: cindex #, no-wrap msgid "GNU C extensions, compared with ANSI/ISO C" msgstr "extensiones GNU C, comparadas con ANSI/ISO C" #. type: cindex #, no-wrap msgid "@option{-ansi} option, disable language extensions" msgstr "@option{-ansi}, opci@'on que inhabilita extensiones del lenguaje" #. type: cindex #, no-wrap msgid "@option{ansi} option, disable language extensions" msgstr "@option{ansi}, opci@'on que inhabilita extensiones del lenguaje" #. type: cindex #, no-wrap msgid "@option{-pedantic} option, conform to the ANSI standard (with @option{-ansi})" msgstr "@option{-pedantic}, opci@'on conforme al est@'andar ANSI (con @option{-ansi})" #. type: cindex #, no-wrap msgid "@option{pedantic} option" msgstr "@option{pedantic}, opci@'on " #. type: cindex #, no-wrap msgid "@option{-std} option, select specific language standard" msgstr "@option{-std}, opci@'on que selecciona un est@'andar espec@'{@dotless{i}}fico del lenguaje" #. type: cindex #, no-wrap msgid "@option{std} option, select specific language standard" msgstr "@option{std}, opci@'on que selecciona un est@'andar espec@'{@dotless{i}}fico del lenguaje" #. type: Plain text msgid "" "By default, @code{gcc} compiles programs using the GNU dialect of the C " "language, referred to as @dfn{GNU C}. This dialect incorporates the " "official ANSI/ISO standard for the C language with several useful GNU " "extensions, such as nested functions and variable-size arrays. Most ANSI/" "ISO programs will compile under GNU C without changes." msgstr "" "Por defecto, @code{gcc} compila programas usando el dialecto GNU del\n" "lenguaje C, llamado como @dfn{GNU C}. Este dialecto incorpora el\n" "est@'andar oficial ANSI/ISO para el lenguaje C con varias extensiones\n" "@'utiles de GNU, tales como funciones anidadas y vectores de tama@~no\n" "variable. La mayor@'{@dotless{i}}a de los programas ANSI/ISO\n" "compilar@'an bajo GNU C sin cambios." #. type: Plain text msgid "" "There are several options which control the dialect of C used by @code" "{gcc}. The most commonly-used options are @option{-ansi} and @option{-" "pedantic}. The specific dialects of the C language for each standard can " "also be selected with the @option{-std} option." msgstr "" "Hay varias opciones que controlan el dialecto de C usado por\n" "@code{gcc}. Las opciones m@'as com@'unmente usadas son @option{-ansi}\n" "y @option{-pedantic}. Los dialectos espec@'{@dotless{i}}ficos del\n" "lenguaje C por cada est@'andar pueden tambi@'en ser seleccionadas con\n" "la opci@'on @option{-std}." #. type: subsection #, no-wrap msgid "ANSI/ISO" msgstr "ANSI/ISO" #. type: subsection #, no-wrap msgid "Strict ANSI/ISO" msgstr "ANSI/ISO estricto" #. type: subsection #, no-wrap msgid "Selecting specific standards" msgstr "Seleccionando est@'andares espec@'{@dotless{i}}ficos" #. type: cindex #, no-wrap msgid "ANSI/ISO C, controlled with @option{-ansi} option" msgstr "ANSI/ISO C, controlado con la opci@'on @option{-ansi}" #. type: cindex #, no-wrap msgid "ISO C, controlled with @option{-ansi} option" msgstr "ISO C, controlado con la opci@'on @option{-ansi}" #. type: Plain text msgid "" "Occasionally a valid ANSI/ISO program may be incompatible with the " "extensions in GNU C. To deal with this situation, the compiler option " "@option{-ansi} disables those GNU extensions which are in conflict with the " "ANSI/ISO standard. On systems using the GNU C Library (@code{glibc}) it " "also disables extensions to the C standard library. This allows programs " "written for ANSI/ISO C to be compiled without any unwanted effects from GNU " "extensions." msgstr "" "A veces un programa ANSI/ISO puede ser incompatible con las\n" "extensiones de GNU C. Para tratar con esta situaci@'on, la opci@'on\n" "del compilador @option{-ansi} inhabilita las extensiones de que\n" "est@'an en conflicto con el est@'andar ANSI/ISO. Los sistemas que usan\n" "la GNU C Library (@code{glibc}) tambi@'en deshabilitan las extensiones\n" "a la librer@'{@dotless{i}}a est@'andar de C. Esto permite que los\n" "programas escritos para ANSI/ISO sean compilados sin efectos no\n" "deseados de extensiones de GNU." #. type: Plain text msgid "" "For example, here is a valid ANSI/ISO C program which uses a variable called " "@code{asm}:" msgstr "" "Por ejemplo, aqu@'{@dotless{i}} hay un programa ANSI/ISO C v@'alido\n" "que usa una variable llamada @code{asm}:" #. type: example #, no-wrap msgid "@verbatiminclude ansi.c\n" msgstr "@verbatiminclude ansi.es.c\n" #. type: Plain text msgid "" "The variable name @code{asm} is valid under the ANSI/ISO standard, but this " "program will not compile in GNU C because @code{asm} is a GNU C keyword " "extension (it allows native assembly instructions to be used in C " "functions). Consequently, it cannot be used as a variable name without " "giving a compilation error:" msgstr "" "El nombre de variable @code{asm} es v@'alido bajo el est@'andar\n" "ANSI/ISO, pero este programa no compilar@'a en GNU C porque @code{asm}\n" "es una palabra reservada de la extensi@'on GNU C (permite instrucciones de\n" "ensamblador nativas para ser usadas en funciones C). Por consiguiente,\n" "no puede ser usado como un nombre de variable sin dar un error de\n" "compilaci@'on: " #. type: cindex #, no-wrap msgid "keywords, additional in GNU C" msgstr "palabras reservadas, adicionales en GNU C" #. type: cindex #, no-wrap msgid "parse error due to language extensions" msgstr "error de an@'alisis sint@'actico debido a extensiones del lenguaje" #. type: example #, fuzzy, no-wrap #| msgid "" #| "$ gcc -Wall ansi.c\n" #| "ansi.c: In function ‘main’:\n" #| "ansi.c:6:14: error: expected identifier or ‘(’ before ‘asm’\n" #| "ansi.c:7:39: error: expected expression before ‘asm’\n" msgid "" "$ gcc -Wall ansi.c\n" "ansi.c: In function 'main':\n" "ansi.c:6:14: error: expected identifier or '(' before 'asm'\n" "ansi.c:7:39: error: expected expression before 'asm'\n" msgstr "" "$ gcc -Wall ansi.c\n" "ansi.es.c: In function ‘main’:\n" "ansi.es.c:6:14: error: expected identifier or ‘(’ before ‘asm’\n" "ansi.es.c:7:39: error: expected expression before ‘asm’\n" #. type: Plain text msgid "" "In contrast, using the @option{-ansi} option disables the @code{asm} keyword " "extension, and allows the program above to be compiled correctly:" msgstr "" "En contraste, usar la opci@'on @option{-ansi} inhabilita la palabra\n" "clave @code{asm}, y permite que el programa anterior sea compilado\n" "correctamente:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -ansi ansi.c\n" "$ ./a.out \n" "the string asm is '6502'\n" msgstr "" "$ gcc -Wall -ansi ansi.es.c\n" "$ ./a.out \n" "la cadena asm es '6502'\n" #. type: Plain text msgid "" "For reference, the non-standard keywords and macros defined by the GNU C " "extensions are @code{asm}, @code{inline}, @code{typeof}, @code{unix} and " "@code{vax}. More details can be found in the GCC Reference Manual ``@cite" "{Using GCC}'' (@pxref{Further reading})." msgstr "" "Por referencia, las palabras reservadas no est@'andar y las macros\n" "definidas por las extensiones GNU C son @code{asm}, @code{inline},\n" "@code{typeof}, @code{unix} y @code{vax}. Se pueden encontrar m@'as\n" "detalles en el Manual de Referencia de GCC ``@cite{Using GCC}''\n" "(@pxref{Lectura adicional})." #. type: cindex #, no-wrap msgid "@code{asm} extension keyword" msgstr "@code{asm}, palabra reservada de extensi@'on" #. type: cindex #, no-wrap msgid "@code{typeof}, GNU C extension keyword" msgstr "@code{typeof}, palabra reservada de la extensi@'on GNU C" #. type: cindex #, no-wrap msgid "@code{unix}, GNU C extension keyword" msgstr "@code{unix}, palabra reservada de la extensi@'on GNU C" #. type: cindex #, no-wrap msgid "@code{vax}, GNU C extension keyword" msgstr "@code{vax}, palabra reservada de la extensi@'on GNU C" #. type: Plain text msgid "" "The next example shows the effect of the @option{-ansi} option on systems " "using the GNU C Library, such as GNU/Linux systems. The program below " "prints the value of pi, @math{\\pi=3.14159...}, from the preprocessor " "definition @code{M_PI} in the header file @file{math.h}:" msgstr "" "El siguiente ejemplo muestra el efecto de la opci@'on @option{-ansi}\n" "en sistemas usando la GNU C Library, tales como sistemas GNU/Linux. El\n" "programa suguiente imprime el valor de pi, @math{\\pi=3.14159...}, dado\n" "por la definici@'on del preprocesador @code{M_PI} en el fichero de\n" "cabecera @file{math.h}:" #. type: example #, no-wrap msgid "@verbatiminclude pi.c\n" msgstr "@verbatiminclude pi.es.c\n" #. type: Plain text msgid "" "The constant @code{M_PI} is not part of the ANSI/ISO C standard library (it " "comes from the BSD version of Unix). In this case, the program will not " "compile with the @option{-ansi} option:" msgstr "" "La constante @code{M_PI} no es parte de la librer@'{@dotless{i}}a\n" "est@'andar ANSI/ISO de C (viene de la versi@'on BSD de Unix). En este\n" "caso, el programa no compilar@'a con la opci@'on @option{-ansi}:" #. type: cindex #, no-wrap msgid "undeclared identifier error for C library, when using @option{-ansi} option" msgstr "error de identificador no declarado para la librer@'{@dotless{i}}a C, al usar la opci@'on @option{-ansi}" #. type: example #, fuzzy, no-wrap #| msgid "" #| "$ gcc -Wall -ansi pi.c\n" #| "pi.c: In function ‘main’:\n" #| "pi.c:7:38: error: ‘M_PI’ undeclared (first use in this\n" #| " function)\n" #| "pi.c:7:38: note: each undeclared identifier is reported \n" #| "only once for each function it appears in\n" msgid "" "$ gcc -Wall -ansi pi.c\n" "pi.c: In function 'main':\n" "pi.c:7:38: error: 'M_PI' undeclared (first use in this\n" " function)\n" "pi.c:7:38: note: each undeclared identifier is reported \n" "only once for each function it appears in\n" msgstr "" "$ gcc -Wall -ansi pi.es.c\n" "pi.es.c: In function ‘main’:\n" "pi.es.c:7:38: error: ‘M_PI’ undeclared (first use in this\n" " function)\n" "pi.es.c:7:38: note: each undeclared identifier is reported \n" "only once for each function it appears in\n" #. type: Plain text msgid "" "The program can be compiled without the @option{-ansi} option. In this case " "both the language and library extensions are enabled by default:" msgstr "" "El programa puede ser compilado sin la opci@'on @option{-ansi}. En\n" "este caso tanto el lenguaje como las extensiones de\n" "librer@'{@dotless{i}}a est@'an habilitadas por defecto:" #. type: example #, no-wrap msgid "" "$ gcc -Wall pi.c\n" "$ ./a.out \n" "the value of pi is 3.141593\n" msgstr "" "$ gcc -Wall pi.es.c\n" "$ ./a.out \n" "el valor de pi es 3.141593\n" #. type: Plain text msgid "" "It is also possible to compile the program using ANSI/ISO C, by enabling " "only the extensions in the GNU C Library itself. This can be achieved by " "defining special macros, such as @code{_GNU_SOURCE}, which enable extensions " "in the GNU C Library:@footnote{The @option{-D} option for defining macros " "will be explained in detail in the next chapter.}" msgstr "" "Tambi@'en es posible compilar el programa usando ANSI/ISO C,\n" "habilitando s@'olo las extensiones en la GNU C Library. Esto puede ser\n" "logrado definiendo macros especiales, tales como @code{_GNU_SOURCE},\n" "que habilita extensiones en GNU C Library:@footnote{La opci@'on\n" "@option{-D} para la definici@'on de macros ser@'a explicada en detalle\n" "en el siguiente cap@'{@dotless{i}}tulo.}" #. type: cindex #, no-wrap msgid "@code{_GNU_SOURCE} macro, enables extensions to GNU C Library" msgstr "macro @code{_GNU_SOURCE}, habilita extensiones a la GNU C Library" #. type: cindex #, no-wrap msgid "@code{GNU_SOURCE} macro (@code{_GNU_SOURCE}), enables extensions to GNU C Library" msgstr "macro @code{GNU_SOURCE} (@code{_GNU_SOURCE}), habilita extensiones a la GNU C Library" #. type: example #, no-wrap msgid "" "$ gcc -Wall -ansi -D_GNU_SOURCE pi.c\n" "$ ./a.out \n" "the value of pi is 3.141593\n" msgstr "" "$ gcc -Wall -ansi -D_GNU_SOURCE pi.es.c\n" "$ ./a.out \n" "el valor de pi es 3.141593\n" #. type: cindex #, no-wrap msgid "feature test macros, GNU C Library" msgstr "macros de test de funcionalidad, GNU C Library" #. type: cindex #, no-wrap msgid "GNU C Library, feature test macros" msgstr "GNU C Library, macros de test de funcionalidad" #. type: cindex #, no-wrap msgid "POSIX extensions, GNU C Library" msgstr "extensiones POSIX, GNU C Library" #. type: cindex #, no-wrap msgid "BSD extensions, GNU C Library" msgstr "extensiones BSD, GNU C Library" #. type: cindex #, no-wrap msgid "XOPEN extensions, GNU C Library" msgstr "extensiones XOPEN, GNU C Library" #. type: cindex #, no-wrap msgid "SVID extensions, GNU C Library" msgstr "extensiones SVID, GNU C Library" #. type: Plain text msgid "" "The GNU C Library provides a number of these macros (referred to as @dfn" "{feature test macros}) which allow control over the support for POSIX " "extensions (@w{@code{_POSIX_C_SOURCE}}), BSD extensions (@w{@code" "{_BSD_SOURCE}}), SVID extensions (@w{@code{_SVID_SOURCE}}), XOPEN extensions " "(@w{@code{_XOPEN_SOURCE}}) and GNU extensions (@w{@code{_GNU_SOURCE}})." msgstr "" "La GNU C Library (Librer@'{@dotless{i}}a GNU C) proporciona un n@'umero de " "estas\n" "macros (referidas como @dfn{macros de test de funcionalidad}) que\n" "permiten controlar a trav@'es del soporte para extensiones POSIX\n" "(@w{@code{_POSIX_C_SOURCE}}), extensiones BSD\n" "(@w{@code{_BSD_SOURCE}}), extensiones SVID (@w{@code{_SVID_SOURCE}}),\n" "extensiones XOPEN (@w{@code{_XOPEN_SOURCE}}) y extensiones GNU\n" "(@w{@code{_GNU_SOURCE}})." #. type: Plain text msgid "" "The @w{@code{_GNU_SOURCE}} macro enables all the extensions together, with " "the POSIX extensions taking precedence over the others in cases where they " "conflict. Further information about feature test macros can be found in the " "@cite{GNU C Library Reference Manual} (@pxref{Further reading})." msgstr "" "La macro @w{@code{_GNU_SOURCE}} habilita todas las extensiones juntas,\n" "siendo las extensiones precedentes al resto en los casos donde haya\n" "conflicto. Informaci@'on adicional acerca de las macros de test de\n" "funcionalidad puede ser encontrada en el @cite{GNU C Library Reference\n" "Manual} (@pxref{Lectura adicional})." #. type: cindex #, no-wrap msgid "ANSI/ISO C, pedantic diagnostics option" msgstr "ANSI/ISO C, opci@'on de diagn@'osticos pedantic" #. type: cindex #, no-wrap msgid "strict ANSI/ISO C, @option{-pedantic} option" msgstr "ANSI/ISO C estricto, opci@'on @option{-pedantic}" #. type: Plain text msgid "" "The command-line option @option{-pedantic} in combination with @option{-" "ansi} will cause @code{gcc} to reject all GNU C extensions, not just those " "that are incompatible with the ANSI/ISO standard. This helps you to write " "portable programs which follow the ANSI/ISO standard." msgstr "" "La opci@'on @option{-pedantic} del comando @code{gcc} en combinaci@'on\n" "con la opci@'on @option{-ansi} har@'a que @code{gcc} rechace todas las\n" "extensiones de GNU C, no s@'olo aquellas que son incompatibles con el\n" "est@'andar ANSI/ISO. Esto ayudar@'a a escribir programas portables que\n" "siguen el est@'andar ANSI/ISO. " #. type: Plain text msgid "" "Here is a program which uses variable-size arrays, a GNU C extension. The " "array @code{x[n]} is declared with a length specified by the integer " "variable @code{n}." msgstr "" "Aqu@'{@dotless{i}} hay un programa que usa arrays de tama@~no\n" "variables, una extensi@'on de GNU C. El array @code{x[n]} es declarado\n" "con un tama@~no especificado por la variable entera @code{n}." #. type: cindex #, no-wrap msgid "variable-size arrays" msgstr "arrays de tama@~no variable" #. type: cindex #, no-wrap msgid "arrays, variable-size" msgstr "tama@~no variable, arrays" #. type: example #, no-wrap msgid "@verbatiminclude gnuarray.c\n" msgstr "@verbatiminclude gnuarray.es.c\n" #. type: Plain text msgid "" "This program will compile with @option{-ansi}, because support for variable " "length arrays does not interfere with the compilation of valid ANSI/ISO " "programs---it is a backwards-compatible extension:" msgstr "" "Este programa compilar@'a con la opci@'on @option{-ansi}, porque\n" "soporta arrays de tama@~no variable que no interfieren con la\n" "compilaci@'on de programas ANSI/ISO v@'alidos ---@'esta es una\n" "extensi@'on compatible hacia atr@'as:" #. type: example #, no-wrap msgid "$ gcc -Wall -ansi gnuarray.c\n" msgstr "$ gcc -Wall -ansi gnuarray.es.c\n" #. type: Plain text msgid "" "However, compiling with @option{-ansi -pedantic} reports warnings about " "violations of the ANSI/ISO standard:" msgstr "" "Sin embargo, compilar con @option{-ansi -pedantic} devuelve avisos de\n" "las violaciones del est@'andar ANSI/ISO:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -ansi -pedantic gnuarray.c\n" "gnuarray.c: In function `main':\n" "gnuarray.c:5: warning: ISO C90 forbids variable-size \n" " array `x'\n" msgstr "" "$ gcc -Wall -ansi -pedantic gnuarray.es.c\n" "gnuarray.es.c: In function `main':\n" "gnuarray.es.c:5: warning: ISO C90 forbids variable-size \n" " array `x'\n" #. type: Plain text msgid "" "Note that an absence of warnings from @option{-ansi -pedantic} does not " "guarantee that a program strictly conforms to the ANSI/ISO standard. The " "standard itself specifies only a limited set of circumstances that should " "generate diagnostics, and these are what @option{-ansi -pedantic} reports." msgstr "" "N@'otese que una ausencia de avisos con @option{-ansi -pedantic} no\n" "garantiza que un programa cumpla estrictamente con el est@'andar\n" "ANSI/ISO. El est@'andar en s@'{@dotless{i}} especifica s@'olo un\n" "limitado conjunto de circunstancias que deber@'{@dotless{i}}an generar\n" "diagn@'osticos, y estos son los que se informa con @option{-ansi\n" "-pedantic}. " #. type: cindex #, no-wrap msgid "@code{c89}/@code{c99}, selected with @option{-std}" msgstr "@code{c89}/@code{c99}, seleccionado con @option{-std}" #. type: cindex #, no-wrap msgid "@code{gnu89}/@code{gnu99}, selected with @option{-std}" msgstr "@code{gnu89}/@code{gnu99}, seleccionado con @option{-std}" #. type: cindex #, no-wrap msgid "@code{iso9899:1990}/@code{iso9899:1999}, selected with @option{-std}" msgstr "@code{iso9899:1990}/@code{iso9899:1999}, seleccionado con @option{-std}" #. type: cindex #, no-wrap msgid "selecting specific language standards, with @option{-std}" msgstr "seleccionando est@'andares espec@'{@dotless{i}}ficos del lenguaje, con @option{-std}" #. type: cindex #, no-wrap msgid "language standards, selecting with @option{-std}" msgstr "est@'andares del lenguaje, seleccionando con @option{-std}" #. type: Plain text msgid "" "The specific language standard used by GCC can be controlled with the @option" "{-std} option. The following C language standards are supported:" msgstr "" "El est@'andar espec@'{@dotless{i}}fico del lenguaje usado por GCC\n" "puede ser controlado con la opci@'on @option{-std}. Los siguientes\n" "est@'andares del lenguaje C son soportados:" #. type: item #, no-wrap msgid "@option{-std=c89} or @option{-std=iso9899:1990}" msgstr "@option{-std=c89} o @option{-std=iso9899:1990}" #. type: table msgid "" "The original ANSI/ISO C language standard (ANSI X3.159-1989, ISO/IEC " "9899:1990). GCC incorporates the corrections in the two ISO Technical " "Corrigenda to the original standard." msgstr "" "El est@'andar original ANSI/ISO C (ANSI X3.159-1989, ISO/IEC\n" "9899:1990). GCC incorpora las correcciones en los dos ISO Technical\n" "Corrigiendo al est@'andar original." #. type: option{#1} #, no-wrap msgid "-std=iso9899:199409" msgstr "-std=iso9899:199409" #. type: table msgid "" "The ISO C language standard with ISO Amendment 1, published in 1994. This " "amendment was mainly concerned with internationalization, such as adding " "support for multibyte characters to the C library." msgstr "" "El lenguaje est@'andar ISO de C con el ISO Amendment 1, publicado en\n" "1994. Esta enmienda era concerniente principalmente con\n" "internacionalizaci@'on, tales como a@~nadir soporte para caracteres\n" "multi-byte a la librer@'{@dotless{i}}a C." #. type: item #, no-wrap msgid "@option{-std=c99} or @option{-std=iso9899:1999}" msgstr "@option{-std=c99} o @option{-std=iso9899:1999}" #. type: table msgid "" "The revised ISO C language standard, published in 1999 (ISO/IEC 9899:1999)." msgstr "" "El lenguaje est@'andar ISO de C, publicado en 1999 (ISO/IEC 9899:1999)." #. type: Plain text msgid "" "The C language standards with GNU extensions can be selected with the " "options @option{-std=gnu89} and @option{-std=gnu99}." msgstr "" "El lenguaje est@'andar de C con las extensiones de GNU puede ser\n" "seleccionado con las opciones @option{-std=gnu89} y\n" "@option{-std=gnu99}. " #. type: section #, no-wrap msgid "Warning options in @code{-Wall}" msgstr "Opciones de aviso en @code{-Wall}" #. type: cindex #, no-wrap msgid "warning options, in detail" msgstr "opciones de aviso, en detalle" #. type: Plain text msgid "" "As described earlier (@pxref{Compiling a simple C program}), the warning " "option @option{-Wall} enables warnings for many common errors, and should " "always be used. It combines a large number of other, more specific, warning " "options which can also be selected individually. Here is a summary of these " "options:" msgstr "" "Tal como se describi@'o antes (@pxref{Compilando un peque@~no programa\n" "C}), la opci@'on de aviso @option{-Wall} habilita avisos para muchos\n" "errores comunes, y siempre se deber@'{@dotless{i}}a\n" "usar. @option{-Wall} puede combinarse con un largo n@'umero de otras \n" "opciones de aviso, m@'as espec@'{@dotless{i}}ficas, que tambi@'en\n" "pueden ser seleccionadas individualmente. Aqu@'{@dotless{i}} hay un\n" "resumen de estas opciones:" #. type: item #, no-wrap msgid "@option{-Wcomment} @r{(included in @option{-Wall})}" msgstr "@option{-Wcomment} @r{(incluida en @option{-Wall})}" #. type: cindex #, no-wrap msgid "comments, nested" msgstr "comentarios, anidados" #. type: cindex #, no-wrap msgid "nested comments, warning of" msgstr "comentarios anidados, aviso de" #. type: cindex #, no-wrap msgid "@option{-Wcomment} option, warn about nested comments" msgstr "@option{-Wcomment}, opci@'on de aviso acerca de comentarios anidados" #. type: cindex #, no-wrap msgid "@option{Wcomment} option, warn about nested comments" msgstr "@option{-Wcomment}, opci@'on de aviso acerca de comentarios anidados" #. type: cindex #, no-wrap msgid "@option{comment} warning option, warn about nested comments" msgstr "@option{comment}, opci@'on de aviso de comentarios anidados" #. type: table msgid "" "This option warns about nested comments. Nested comments typically arise " "when a section of code containing comments is later @dfn{commented out}:" msgstr "" "Esta opci@'on avisa acerca de comentarios anidados. Los comentarios\n" "anidados normalmente surgen cuando una secci@'on de c@'odigo contiene\n" "comentarios despu@'es de haber sido ya comentada:" #. type: example #, no-wrap msgid "" "/* commented out \n" "double x = 1.23 ; /* x-position */\n" "*/\n" msgstr "" "/* comienzo de comentario\n" "double x = 1.23 ; /* posici@'on x */\n" "*/\n" #. type: table msgid "" "Nested comments can be a source of confusion---the safe way to ``comment " "out'' a section of code containing comments is to surround it with the " "preprocessor directive @code{#if 0 ... #endif}:" msgstr "" "Los comentarios anidados pueden ser una fuente de confusi@'on ---el\n" "camino seguro de ``comentar'' una secci@'on de c@'odigo que contiene\n" "comentarios es usar la directiva del preprocesador @code{#if 0\n" "... #endif} alrededor de ella: " #. type: cindex #, no-wrap msgid "@code{#if}, preprocessor directive" msgstr "@code{#if}, directiva del preprocesador" #. type: example #, no-wrap msgid "" "/* commented out */\n" "#if 0 \n" "double x = 1.23 ; /* x-position */\n" "#endif\n" msgstr "" "/* comentario exterior */\n" "#if 0\n" "double x = 1.23 ; /* posici@'on x */\n" "#endif" #. type: item #, no-wrap msgid "@option{-Wformat} @r{(included in @option{-Wall})}" msgstr "@option{-Wformat} @r{(incluida en @option{-Wall})}" #. type: cindex #, no-wrap msgid "@option{-Wformat} option, warn about incorrect format strings" msgstr "@option{-Wformat}, opci@'on de aviso de formato de cadenas incorrecto" #. type: cindex #, no-wrap msgid "format strings, incorrect usage warning" msgstr "formato de cadenas, aviso de uso incorrecto" #. type: cindex #, no-wrap msgid "@code{printf}, incorrect usage warning" msgstr "@code{printf}, aviso de uso incorrecto" #. type: cindex #, no-wrap msgid "@code{scanf}, incorrect usage warning" msgstr "@code{scanf}, aviso de uso incorrecto" #. type: table msgid "" "This option warns about the incorrect use of format strings in functions " "such as @code{printf} and @code{scanf}, where the format specifier does not " "agree with the type of the corresponding function argument." msgstr "" "Esta opci@'on avisa acerca del incorrecto uso del formato de cadenas\n" "en funciones tales como @code{printf} y @code{scanf}, donde el\n" "especificador de formato no concuerda con el tipo del correspondiente\n" "argumento de la funci@'on." #. type: item #, no-wrap msgid "@option{-Wunused} @r{(included in @option{-Wall})}" msgstr "@option{-Wunused} @r{(incluida en @option{-Wall})}" #. type: cindex #, no-wrap msgid "unused variable warning" msgstr "aviso de variable no usada" #. type: cindex #, no-wrap msgid "@option{-Wunused} option, unused variable warning" msgstr "@option{-Wunused}, opci@'on de aviso de variable no usada" #. type: cindex #, no-wrap msgid "@option{Wunused} option, unused variable warning" msgstr "@option{Wunused}, opci@'on de aviso de variable no usada" #. type: table msgid "" "This option warns about unused variables. When a variable is declared but " "not used this can be the result of another variable being accidentally " "substituted in its place. If the variable is genuinely not needed it can be " "removed from the source code." msgstr "" "Esta opci@'on avisa acerca de variables no usadas. Cuando una variable\n" "es declarada pero no se usa, puede ser debido a que otra variable ha\n" "sido accidentalmente sustituida en su lugar. Si la variable realmente\n" "no se necesita, @'esta pueder ser eliminada del c@'odigo fuente." #. type: item #, no-wrap msgid "@option{-Wimplicit} @r{(included in @option{-Wall})}" msgstr "@option{-Wimplicit} @r{(incluida en @option{-Wall})}" #. type: cindex #, no-wrap msgid "@option{-Wimplicit} option, warn about missing declarations" msgstr "@option{-Wimplicit}, opci@'on de aviso de declaraciones no encontradas" #. type: cindex #, no-wrap msgid "@option{Wimplicit} option, warn about missing declarations" msgstr "@option{Wimplicit}, opci@'on de aviso de declaraciones no encontradas" #. type: cindex #, no-wrap msgid "missing prototypes warning" msgstr "aviso de prototipos perdidos" #. type: cindex #, no-wrap msgid "prototypes, missing" msgstr "prototipos, perdidos" #. type: table msgid "" "This option warns about any functions that are used without being declared. " "The most common reason for a function to be used without being declared is " "forgetting to include a header file." msgstr "" "Esta opci@'on avisa de cualquier funci@'on que es usada sin haber sido\n" "declarada. La raz@'on m@'as com@'un para que una funci@'on sea usada\n" "sin haber sido declarada es haber olvidado incluir un fichero de cabecera." #. type: item #, no-wrap msgid "@option{-Wreturn-type} @r{(included in @option{-Wall})}" msgstr "@option{-Wreturn-type} @r{(incluida en @option{-Wall})}" #. type: cindex #, no-wrap msgid "return type, invalid" msgstr "tipo devuelto, no v@'alido" #. type: cindex #, no-wrap msgid "empty @code{return}, incorrect use of" msgstr "@code{return} vac@'{@dotless{i}}o, uso incorrecto de" #. type: cindex #, no-wrap msgid "void @code{return}, incorrect use of" msgstr "void @code{return}, uso incorrecto de" #. type: cindex #, no-wrap msgid "@option{-Wreturn-type} option, warn about incorrect return types" msgstr "@option{-Wreturn-type}, opci@'on de aviso de tipos devueltos incorrectos" #. type: cindex #, no-wrap msgid "@option{Wreturn-type} option, warn about incorrect return types" msgstr "@option{Wreturn-type}, opci@'on de aviso de tipos devueltos incorrectos" #. type: table msgid "" "This option warns about functions that are defined without a return type but " "not declared @code{void}. It also catches empty @code{return} statements in " "functions that are not declared @code{void}." msgstr "" "Esta opci@'on avisa de funciones que por su definici@'on no tienen\n" "tipo de retorno, pero no son declaradas como @code{void}. Tambi@'en\n" "avisa de sentencias con un @code{return} vac@'{@dotless{i}}o en\n" "funciones que no son declaradas @code{void}." #. type: table msgid "" "For example, the following program does not use an explicit return value:" msgstr "" "Por ejemplo, el siguiente programa no usa un valor de retorno\n" "expl@'{@dotless{i}}cito:" #. type: example #, no-wrap msgid "@verbatiminclude main4.c\n" msgstr "@verbatiminclude main4.es.c\n" #. type: table msgid "" "The lack of a return value in the code above could be the result of an " "accidental omission by the programmer---the value returned by the main " "function is actually the return value of the @code{printf} function (the " "number of characters printed). To avoid ambiguity, it is preferable to use " "an explicit value in the return statement, either as a variable or a " "constant, such as @code{return 0}." msgstr "" "La falta de un valor de retorno en el c@'odigo de arriba\n" "podr@'{@dotless{i}}a ser el resultado de una omisi@'on accidental por\n" "el programador ---el valor devuelto por la funci@'on main es el valor\n" "de retorno de la funci@'on @code{printf} (el n@'umero de caracteres\n" "impresos). Para evitar ambiguedad, es preferible usar un valor\n" "expl@'{@dotless{i}}cito en la sentencia de retorno, bien una variable,\n" "@'o bien una constante, como @code{return 0}." #. type: Plain text msgid "" "The complete set of warning options included in @option{-Wall} can be found " "in the GCC Reference Manual ``@cite{Using GCC}'' (@pxref{Further reading}). " "The options included in @option{-Wall} have the common characteristic that " "they report constructions which are always wrong, or can easily be rewritten " "in an unambiguously correct way. This is why they are so useful---any " "warning produced by @option{-Wall} can be taken as an indication of a " "potentially serious problem." msgstr "" "El conjunto completo de opciones de aviso incluidas en @option{-Wall}\n" "puede encontrarse en el Manual de Referencia de GCC ``@cite{Using\n" "GCC}'' (@pxref{Lectura adicional}). Las opciones incluidas en\n" "@option{-Wall} tienen la caracter@'{@dotless{i}}stica com@'un de\n" "informar de construcciones son siempre err@'oneas, o pueden ser\n" "f@'acilmente reescritas en un inambiguo camino correcto. Esta es la\n" "raz@'on de que @'estos sean tan @'utiles ---cualquier aviso producido\n" "por @option{-Wall} puede ser tomado como una indicaci@'on de un\n" "potencial serio problema." #. type: cindex #, no-wrap msgid "additional warning options" msgstr "opciones de avisos adicionales" #. type: cindex #, no-wrap msgid "warning options, additional" msgstr "opciones de avisos, adicionales" #. type: Plain text msgid "" "GCC provides many other warning options that are not included in @option{-" "Wall} but are often useful. Typically these produce warnings for source " "code which may be technically valid but is very likely to cause problems. " "The criteria for these options are based on experience of common errors---" "they are not included in @option{-Wall} because they only indicate possibly " "problematic or ``suspicious'' code." msgstr "" "GCC proporciona muchas otras opciones de aviso que no son incluidas en\n" "@option{-Wall} pero que con frecuencia son @'utiles. Generalmente\n" "estas producen avisos para el c@'odigo fuente que puede ser\n" "t@'ecnicamente v@'alido, pero puede causar problemas. El criterio para\n" "estas opciones est@'a basado en la experiencia de errores comunes\n" "---estos no son incluidos en @option{-Wall} s@'olo indican posibles\n" "problemas o c@'odigo ``sospechoso''." #. type: Plain text msgid "" "Since these warnings can be issued for valid code it is not necessary to " "compile with them all the time. It is more appropriate to use them " "periodically and review the results, checking for anything unexpected, or to " "enable them for some programs or files." msgstr "" "Debido a que estos avisos pueden ser resueltos con c@'odigo v@'alido\n" "no es necesario compilar con estas opciones todo el tiempo. Es m@'as\n" "apropiado usarlas peri@'odicamente y revisar los resultados,\n" "comprobando cualquier cosa inesperada, o habilitarlas para algunos\n" "programas o ficheros." #. type: option{#1} #, no-wrap msgid "-W" msgstr "-W" #. type: cindex #, no-wrap msgid "common errors, not included with @option{-Wall}" msgstr "errores comunes, no incluidos con @option{-Wall}" #. type: cindex #, no-wrap msgid "@option{-W} option, enable additional warnings" msgstr "@option{-W}, opci@'on que habilita avisos adicionales" #. type: cindex #, no-wrap msgid "@option{W} option, enable additional warnings" msgstr "@option{W}, opci@'on que habilita avisos adicionales" #. type: cindex #, no-wrap msgid "warnings, additional with @option{-W}" msgstr "avisos, addicionales con @option{-W}" #. type: cindex #, no-wrap msgid "warning option, @option{-W} additional warnings" msgstr "opci@'on de aviso, avisos adicionales @option{-W}" #. type: table msgid "" "This is a general option similar to @option{-Wall} which warns about a " "selection of common programming errors, such as functions which can return " "without a value (also known as ``falling off the end of the function " "body''), and comparisons between signed and unsigned values. For example, " "the following function tests whether an unsigned integer is negative (which " "is impossible, of course):" msgstr "" "Esta es una opci@'on general similar a @option{-Wall} que avisa acerca\n" "de una selecci@'on de errores comunes de programaci@'on, tales como\n" "funciones que no devuelven un valor, y comparaciones entre valores con\n" "y sin signo. Por ejemplo, la siguiente funci@'on comprueba si un\n" "entero sin signo es negativo (lo cual es imposible, claro):" #. type: example #, no-wrap msgid "@verbatiminclude w.c\n" msgstr "@verbatiminclude w.es.c\n" #. type: table msgid "Compiling this function with @option{-Wall} does not produce a warning," msgstr "" "Tras compilar esta funci@'on con @option{-Wall} no se produce ning@'un\n" "aviso," #. type: example #, no-wrap msgid "$ gcc -Wall -c w.c\n" msgstr "$ gcc -Wall -c w.es.c\n" #. type: table msgid "but does give a warning with @option{-W}:" msgstr "pero da un aviso con @option{-W}:" #. type: cindex #, no-wrap msgid "comparison of expression always true/false warning" msgstr "comparaci@'on de expresiones de aviso always true/false" #. type: example #, fuzzy, no-wrap #| msgid "" #| "$ gcc -W -c w.c\n" #| "w.c: In function ‘foo’:\n" #| "w.c:4:3: warning: comparison of unsigned \n" #| "expression < 0 is always false [-Wtype-limits]\n" msgid "" "$ gcc -W -c w.c\n" "w.c: In function 'foo':\n" "w.c:4:3: warning: comparison of unsigned \n" "expression < 0 is always false [-Wtype-limits]\n" msgstr "" "$ gcc -W -c w.es.c\n" "w.es.c: In function ‘foo’:\n" "w.es.c:4:3: warning: comparison of unsigned \n" "expression < 0 is always false [-Wtype-limits]\n" #. type: table msgid "" "In practice, the options @option{-W} and @option{-Wall} are normally used " "together." msgstr "" "En la pr@'actica, las opciones @option{-W} y @option{-Wall} se usan juntas." #. type: option{#1} #, no-wrap msgid "-Wconversion" msgstr "-Wconversion" #. type: cindex #, no-wrap msgid "type conversions, warning of" msgstr "coversiones de tipo, aviso de de" #. type: cindex #, no-wrap msgid "conversions between types, warning of" msgstr "conversiones entre tipos, aviso de" #. type: cindex #, no-wrap msgid "unsigned variable converted to signed, warning of" msgstr "variable sin signo convertida a con signo, aviso de" #. type: cindex #, no-wrap msgid "signed variable converted to unsigned, warning of" msgstr "variable con signo convertida a sin signo, aviso de" #. type: cindex #, no-wrap msgid "@option{-Wconversion} option, warn about type conversions" msgstr "@option{-Wconversion}, opci@'on de aviso de conversiones de tipos" #. type: cindex #, no-wrap msgid "@option{Wconversion} option, warn about type conversions" msgstr "@option{Wconversion}, opci@'on de aviso de conversiones de tipos" #. type: table msgid "" "This option warns about implicit type conversions that could cause " "unexpected results, such as conversions between floating-point and integer " "types, between signed and unsigned types and between types of different " "width (e.g. long and short integers). Conversions can occur in expressions " "and assignments, and in calls to functions if the types of the arguments do " "not match those specified in the prototype." msgstr "" "Esta opci@'on avisa acerca de conversiones impl@'{@dotless{i}}citas de\n" "tipo que podr@'{@dotless{i}}an causar resultados inesperados, tales\n" "como conversiones entre tipos reales y enteros, entre tipos con y sin\n" "signo y entre tipos de diferente tama@~no (por ej. enteros long y\n" "short). Las conversiones pueden ocurrir en expresiones y asignaciones,\n" "y en llamadas a funciones si los tipos de los argumentos no concuerdan\n" "con aquellos especificados en el prototipo." #. type: table msgid "" "For example, the integer absolute value function @code{int abs(int i)} is " "easily confused with the corresponding floating-point function @code{double " "fabs(double x)}. This can lead to incorrect results, as shown in the " "following program:" msgstr "" "Por ejemplo, el valor entero de la funci@'on absoluto @code{int\n" "abs(int i)} es f@'acilmente confundido con la correspondiente\n" "funci@'on de coma flotante @code{double fabs(double x)}. Esto puede\n" "traer resultados incorrectos, como muestra el siguiente programa:" #. type: example #, no-wrap msgid "@verbatiminclude wabs.c\n" msgstr "@verbatiminclude wabs.es.c\n" #. type: example #, no-wrap msgid "" "$ gcc -Wall wabs.c\n" "$ ./a.out\n" "x = -3.14 |x| = 3 @r{(incorrect)}\n" msgstr "" "$ gcc -Wall wabs.es.c\n" "$ ./a.out\n" "x = -3.14 |x| = 3 @r{(incorrecto)}\n" #. type: table msgid "but does give a warning with @option{-Wconversion}:" msgstr "pero da un aviso con @option{-Wconversion}:" #. type: example #, fuzzy, no-wrap #| msgid "" #| "$ gcc -Wall -Wconversion wabs.c\n" #| "wabs.c: In function ‘main’:\n" #| "wabs.c:8:3: warning: conversion to ‘int’ from \n" #| "‘double’ may alter its value [-Wconversion]\n" msgid "" "$ gcc -Wall -Wconversion wabs.c\n" "wabs.c: In function 'main':\n" "wabs.c:8:3: warning: conversion to 'int' from \n" "'double' may alter its value [-Wconversion]\n" msgstr "" "$ gcc -Wall -Wconversion wabs.es.c\n" "wabs.es.c: In function ‘main’:\n" "wabs.es.c:8:3: warning: conversion to ‘int’ from \n" "‘double’ may alter its value [-Wconversion]\n" #. type: table msgid "" "The @option{-Wconversion} option also catches errors such as the assignment " "of a negative value to an unsigned variable, as in the following code," msgstr "" "La opci@'on @option{-Wconversion} tambi@'en captura errores tales como\n" "la asignaci@'on de un valor negativo a una variable sin signo, como en\n" "el siguiente c@'odigo," #. type: example #, no-wrap msgid "unsigned int x = -1;\n" msgstr "unsigned int x = -1;\n" #. type: cindex #, no-wrap msgid "casts, used to avoid conversion warnings" msgstr "casts, usados para evitar avisos de conversi@'on" #. type: cindex #, no-wrap msgid "unsigned integer, casting" msgstr "entero sin signo, casting" #. type: cindex #, no-wrap msgid "signed integer, casting" msgstr "entero con signo, casting" #. type: table msgid "" "This is technically allowed by the ANSI/ISO C standard (with the negative " "integer being converted to a positive integer, according to the machine " "representation) but could be a simple programming error. If you need to " "perform such a conversion you can use an explicit cast, such as @code" "{(unsigned int)-1}, to avoid any warnings from this option. On two's-" "complement machines the cast of @math{-1} gives the maximum number that can " "be represented by an unsigned integer." msgstr "" "Esto est@'a permitido t@'ecnicamente por el est@'andar ANSI/ISO C (con\n" "el entero negativo siendo convertido a entero positivo, de acuerdo a\n" "la representaci@'on de la m@'aquina) pero podr@'{@dotless{i}}a ser un\n" "simple error de programaci@'on. Si se necesita realizar tal\n" "conversi@'on se puede usar un cast expl@'{@dotless{i}}cito, tal como\n" "@code{(unsigned int)-1}, para evitar avisos con esta opci@'on. En\n" "m@'aquinas con complemento a dos el cast de @math{-1} da el m@'aximo\n" "n@'umero que puede ser representado por un entero sin signo. " #. type: option{#1} #, no-wrap msgid "-Wshadow" msgstr "-Wshadow" #. type: cindex #, no-wrap msgid "shadowing of variables" msgstr "ocultamiento de variables" #. type: cindex #, no-wrap msgid "variable shadowing" msgstr "variable oculta" #. type: cindex #, no-wrap msgid "@option{-Wshadow} option, warn about shadowed variables" msgstr "@option{-Wshadow}, opci@'on de aviso de variables ocultas" #. type: cindex #, no-wrap msgid "@option{Wshadow} option, warn about shadowed variables" msgstr "@option{Wshadow}, opci@'on de aviso de variables ocultas" #. type: table msgid "" "This option warns about the redeclaration of a variable name in a scope " "where it has already been declared. This is referred to as variable @dfn" "{shadowing}, and causes confusion about which occurrence of the variable " "corresponds to which value." msgstr "" "Esta opci@'on avisa acerca de la redeclaraci@'on de un nombre de\n" "variable en un contexto en el que ha sido declarado. Esto define una\n" "variable @dfn{oculta}, y causa la confusi@'on de qu@'e ocurrencia de\n" "la variable corresponde a qu@'e valor." #. type: table msgid "" "The following function declares a local variable @code{y} that shadows the " "declaration in the body of the function:" msgstr "" "La siguiente funci@'on declara una variable local @code{y} que\n" "oculta la declaraci@'on en el cuerpo de la funci@'on:" #. type: example #, no-wrap msgid "@verbatiminclude shadow.c\n" msgstr "@verbatiminclude shadow.es.c\n" #. type: table msgid "" "This is valid ANSI/ISO C, where the return value is 1. The shadowing of the " "variable @code{y} might make it seem (incorrectly) that the return value is " "@code{x}, when looking at the line @code{y = x} (especially in a large and " "complicated function)." msgstr "" "Esto es ANSI/ISO C v@'alido, y el valor devuelto es 1. La ocultaci@'on\n" "de la variable @code{y} podr@'{@dotless{i}}a parecer (de manera\n" "incorrecta) que el valor devuelto es @code{x}, al mirar la\n" "l@'{@dotless{i}}nea @code{y = x} (especialmente en una larga y\n" "complicada funci@'on)." #. type: table msgid "" "Shadowing can also occur for function names. For example, the following " "program attempts to define a variable @code{sin} which shadows the standard " "function @code{sin(x)}." msgstr "" "La ocultaci@'on tambi@'en puede ocurrir en nombres de funci@'on. Por\n" "ejemplo, el siguiente programa intenta definir una variable @code{sin}\n" "que oculta la funci@'on est@'andar @code{sin(x)}." #. type: example #, no-wrap msgid "@verbatiminclude shadow2.c\n" msgstr "@verbatiminclude shadow2.es.c\n" #. type: table msgid "This error will be detected by the @option{-Wshadow} option." msgstr "Este error ser@'a detectado con la opci@'on @option{-Wshadow}." #. type: option{#1} #, no-wrap msgid "-Wcast-qual" msgstr "-Wcast-qual" #. type: cindex #, no-wrap msgid "qualifiers, warning about overriding by casts" msgstr "calificadores, aviso de sobrescritura por casts" #. type: cindex #, no-wrap msgid "@code{const}, warning about overriding by casts" msgstr "@code{const}, aviso de sobreescritura por casts" #. type: cindex #, no-wrap msgid "@option{-Wcast-qual} option, warn about casts removing qualifiers" msgstr "@option{-Wcast-qual}, opci@'on de aviso de casts eliminando calificadores" #. type: cindex #, no-wrap msgid "@option{Wcast-qual} option, warn about casts removing qualifiers" msgstr "@option{Wcast-qual}, opci@'on de aviso de casts eliminando calificadores" #. type: table msgid "" "This option warns about pointers that are cast to remove a type qualifier, " "such as @code{const}. For example, the following function discards the @code" "{const} qualifier from its input argument, allowing it to be overwritten:" msgstr "" "Esta opci@'on avisa de punteros que son transformados para eliminar un\n" "calificador de tipo tal como @code{const}. Por ejemplo, la siguiente\n" "funci@'on descarta el calificador @code{const} desde su argumento de\n" "entrada, permiti@'endole ser sobreescrito:" #. type: example #, no-wrap msgid "@verbatiminclude castqual.c\n" msgstr "@verbatiminclude castqual.es.c\n" #. type: table msgid "" "The modification of the original contents of @code{str} is a violation of " "its @code{const} property. This option will warn about the improper cast of " "the variable @code{str} which allows the string to be modified." msgstr "" "La modificaci@'on de los contenidos originales de @code{str} es una\n" "violaci@'on de la propiedad @code{const}. Esta opci@'on avisar@'a de la\n" "inapropiada transformaci@'on de la variable @code{str} que permite que\n" "la cadena sea modificada." #. type: option{#1} #, no-wrap msgid "-Wwrite-strings" msgstr "-Wwrite-strings" #. type: cindex #, no-wrap msgid "writable string constants, disabling" msgstr "cadenas constantes con posibilidad de escritura, deshabilitando" #. type: cindex #, no-wrap msgid "constant strings, compile-time warnings" msgstr "cadenas constantes, avisos en tiempo de compilaci@'on" #. type: cindex #, no-wrap msgid "@option{-Wwrite-strings} option, warning for modified string constants" msgstr "@option{-Wwrite-strings}, opci@'on de aviso para cadenas constantes modificadas" #. type: cindex #, no-wrap msgid "@option{Wwrite-strings} option, warning for modified string constants" msgstr "@option{Wwrite-strings}, opci@'on de aviso para cadenas constantes modificadas" #. type: table msgid "" "This option implicitly gives all string constants defined in the program a " "@code{const} qualifier, causing a compile-time warning if there is an " "attempt to overwrite them. The result of modifying a string constant is not " "defined by the ANSI/ISO standard, and the use of writable string constants " "is deprecated in GCC." msgstr "" "Esta opci@'on impl@'{@dotless{i}}citamente da a todas las constantes\n" "definidas en el programa un calificador @code{const}, causando un\n" "aviso en tiempo de compilaci@'on si hay un intento de\n" "sobreescribirlo. El resultado de modificar una cadena constante no\n" "est@'a definido por el est@'andar ANSI/ISO, y el uso de constantes de\n" "cadena escribibles est@'a obsoleto en GCC." #. type: cindex #, no-wrap msgid "K&R dialect of C, warnings of different behavior" msgstr "K&R dialecto de C, avisos de comportamiento diferente" #. type: cindex #, no-wrap msgid "Traditional C (K&R), warnings of different behavior" msgstr "C tradicional (K&R), avisos de comportamiento diferente" #. type: cindex #, no-wrap msgid "@option{-Wtraditional} option, warn about traditional C" msgstr "@option{-Wtraditional}, opci@'on de aviso de C tradicional" #. type: cindex #, no-wrap msgid "@option{Wtraditional} option, warn about traditional C" msgstr "@option{Wtraditional}, opci@'on de aviso de C tradicional" #. type: option{#1} #, no-wrap msgid "-Wtraditional" msgstr "-Wtraditional" #. type: table msgid "" "This option warns about parts of the code which would be interpreted " "differently by an ANSI/ISO compiler and a ``traditional'' pre-ANSI compiler." "@footnote{The traditional form of the C language was described in the " "original C reference manual ``@cite{The C Programming Language (First " "Edition)}'' by Kernighan and Ritchie.} When maintaining legacy software it " "may be necessary to investigate whether the traditional or ANSI/ISO " "interpretation was intended in the original code for warnings generated by " "this option." msgstr "" "Esta opci@'on avisa acerca de partes de c@'odigo que\n" "deber@'{@dotless{i}}an ser interpretadas de manera diferente por un\n" "compilador ANSI/ISO y un compilador ``tradicional''\n" "pre-ANSI.@footnote{La forma tradicional del lenguaje C fu@'e descrita\n" "en el manual de referencia original de C ``@cite{The C Programming\n" "Language (First Edition)}'' por Kernighan y Ritchie.} Cuando se\n" "mantiene software legado puede ser necesario investigar si en el\n" "c@'odigo original se pretend@'{@dotless{i}}a la interpretaci@'on\n" "ANSI/ISO o la tradicional para entender los avisos generados por esta\n" "opci@'on. " #. type: cindex #, no-wrap msgid "warnings, promoting to errors" msgstr "avisos, promoviendo errores" #. type: cindex #, no-wrap msgid "compilation, stopping on warning" msgstr "compilaci@'on, parando en avisos" #. type: cindex #, no-wrap msgid "@option{-Werror} option, convert warnings to errors" msgstr "@option{-Werror}, opci@'on que convierte avisos en errores" #. type: cindex #, no-wrap msgid "@option{Werror} option, convert warnings to errors" msgstr "@option{Werror}, opci@'on que convierte avisos en errores" #. type: Plain text msgid "" "The options above produce diagnostic warning messages, but allow the " "compilation to continue and produce an object file or executable. For large " "programs it can be desirable to catch all the warnings by stopping the " "compilation whenever a warning is generated. The @option{-Werror} option " "changes the default behavior by converting warnings into errors, stopping " "the compilation whenever a warning occurs." msgstr "" "Las opciones anteriores producen mensajes de avisos de diagn@'ostico,\n" "pero permiten la compilaci@'on para continuar y producir un fichero\n" "objeto o ejecutable. Para programas grandes esto puede ser deseable\n" "para capturar todos los avisos deteniendo la compilaci@'on siempre que\n" "se genera un aviso. La opci@'on @option{-Werror} cambia el\n" "comportamiento por defecto al convertir los avisos en errores, parando\n" "la compilaci@'on siempre y cuando ocurra un aviso." #. type: Plain text msgid "" "The following options are a good choice for finding problems in C and C++ " "programs:" msgstr "" "Las siguiente opciones son una buena elecci@'on para encontrar\n" "problemas en programas C y C++:" #. type: example #, no-wrap msgid "" "$ gcc -ansi -pedantic -Wall -W -Wconversion \n" " -Wshadow -Wcast-qual -Wwrite-strings\n" msgstr "" "$ gcc -ansi -pedantic -Wall -W -Wconversion \n" " -Wshadow -Wcast-qual -Wwrite-strings\n" #. type: Plain text msgid "" "While this list is not exhaustive, regular use of these options will catch " "many common errors." msgstr "" "Aunque esta lista no es exhaustiva, el uso regular de estas opciones\n" "capturar@'a muchos errores comunes." #. type: cindex #, no-wrap msgid "@code{cpp}, C preprocessor" msgstr "@code{cpp}, preprocesador de C" #. type: cindex #, no-wrap msgid "preprocessor, using" msgstr "preprocesador, usando" #. type: Plain text msgid "" "This chapter describes the use of the GNU C preprocessor @code{cpp}, which " "is part of the GCC package. The preprocessor expands macros in source files " "before they are compiled. It is automatically called whenever GCC processes " "a C or C++ program.@footnote{In recent versions of GCC the preprocessor is " "integrated into the compiler, although a separate @command{cpp} command is " "also provided.}" msgstr "" "Este cap@'{@dotless{i}}tulo describe el uso del preprocesador C GNU @code" "{cpp},\n" "que forma parte del paquete GCC. Este preprocesador expande las macros\n" "en los ficheros fuentes antes de ser compilados. Es invocado de forma\n" "autom@'atica cada vez que GCC procesa un programa C o C++.@footnote{En\n" "recientes versiones de GCC el preprocesador est@'a integrado dentro\n" "del compilador, aunque un comando por separado @command{cpp} est@'a\n" "siempre incluido.}" #. type: section #, no-wrap msgid "Defining macros" msgstr "Definiendo macros" #. type: section #, no-wrap msgid "Macros with values" msgstr "Macros con valor" #. type: section #, no-wrap msgid "Preprocessing source files" msgstr "Preprocesando archivos fuentes" #. type: cindex #, no-wrap msgid "defining macros" msgstr "definiendo macros" #. type: cindex #, no-wrap msgid "macros, defining in preprocessor" msgstr "macros, definici@'on en preprocesador" #. type: cindex #, no-wrap msgid "@code{#define}, preprocessor directive" msgstr "@code{#define}, directiva del preprocesador" #. type: cindex #, no-wrap msgid "@code{#ifdef}, preprocessor directive" msgstr "@code{#ifdef}, directiva del preprocesador" #. type: Plain text msgid "" "The following program demonstrates the most common use of the C " "preprocessor. It uses the preprocessor conditional @code{#ifdef} to check " "whether a macro is defined:" msgstr "" "El siguiente programa demuestra el uso habitual del preprocesador\n" "C. Se usa la instrucci@'on condicional del preprocesador @code{#ifdef}\n" "para comprobar si la macro ya fu@'e definida:" #. type: example #, no-wrap msgid "@verbatiminclude dtest.c\n" msgstr "@verbatiminclude dtest.es.c\n" #. type: Plain text msgid "" "When the macro is defined, the preprocessor includes the corresponding code " "up to the closing @code{#endif} command. In this example, the macro which " "is tested is called @code{TEST}, and the conditional part of the source code " "is a @code{printf} statement which prints the message ``@code{Test mode}''." msgstr "" "Cuando la macro est@'a definida, el preprocesador incluye el c@'odigo\n" "correspondiente antes del comando de cierre @code{#endif}. En este\n" "ejemplo la macro comprobada es llamada @code{TEST}, y la parte\n" "condicional del c@'odigo fuente es la instrucci@'on @code{printf} que\n" "imprime el mensaje ``@code{Modo test}''." #. type: Plain text msgid "" "The @code{gcc} option @option{-D@var{NAME}} defines a preprocessor macro " "@code{NAME} from the command line. If the program above is compiled with " "the command-line option @option{-DTEST}, the macro @code{TEST} will be " "defined and the resulting executable will print both messages:" msgstr "" "La opci@'on de @code{gcc} @option{-D@var{NAME}} define una macro del\n" "preprocesador @code{NAME} desde la l@'{@dotless{i}}nea de comandos. Si\n" "el programa anterior es compilado con la opci@'on de\n" "l@'{@dotless{i}}nea de comandos @option{-DTEST}, la macro @code{TEST}\n" "ser@'a definida y el ejecutable resultante imprimir@'a ambos mensajes:" #. type: cindex #, no-wrap msgid "@option{-D} option, define macro" msgstr "@option{-D}, opci@'on para definir macros" #. type: cindex #, no-wrap msgid "@option{D} option, define macro" msgstr "@option{D}, opci@'on para definir macros" #. type: example #, no-wrap msgid "" "$ gcc -Wall -DTEST dtest.c\n" "$ ./a.out\n" "Test mode\n" "Running...\n" msgstr "" "$ gcc -Wall -DTEST dtest.es.c\n" "$ ./a.out\n" "Modo test\n" "Ejecutando..." #. type: Plain text msgid "" "If the same program is compiled without the @option{-D} option then the " "``@code{Test mode}'' message is omitted from the source code after " "preprocessing, and the final executable does not include the code for it:" msgstr "" "Si el programa es compilado sin la opci@'on @option{-D} entonces el\n" "mensaje ``@code{Modo test}'' se omite del c@'odigo fuente despu@'es\n" "del preproceso, y el ejecutable final no incluir@'a el c@'odigo para @'el:" #. type: example #, no-wrap msgid "" "$ gcc -Wall dtest.c\n" "$ ./a.out\n" "Running...\n" msgstr "" "$ gcc -Wall dtest.es.c\n" "$ ./a.out\n" "Ejecutando...\n" #. type: cindex #, no-wrap msgid "namespace, reserved prefix for preprocessor" msgstr "espacio de nombres, prefijo reservado para el preprocesador" #. type: Plain text msgid "" "Macros are generally undefined, unless specified on the command line with " "the option @option{-D}, or in a source file (or library header file) with " "@code{#define}. Some macros are automatically defined by the compiler---" "these typically use a reserved namespace beginning with a double-underscore " "prefix @samp{__}." msgstr "" "Las macros est@'an generalmente indefinidas, a menos que sea\n" "especificada en la l@'{@dotless{i}}nea de comandos, o en un archivo\n" "fuente (o un archivo de cabecera de librer@'{@dotless{i}}a) con\n" "@code{#define}. Algunas macros son definidas de forma autom@'atica por\n" "el compilador ---habitualmente usan un espacio de nombres reservado\n" "comenzando con un prefijo de doble subrayado @samp{__}." #. type: Plain text msgid "" "The complete set of predefined macros can be listed by running the GNU " "preprocessor @code{cpp} with the option @option{-dM} on an empty file:" msgstr "" "El conjunto completo de macros predefinidas por el preprocesador puede\n" "ser listado ejecutanto el preprocesador @code{cpp} con la opci@'on\n" "@option{-dM} en un archivo vacio:" #. type: cindex #, no-wrap msgid "predefined macros" msgstr "macros predefinidas" #. type: cindex #, no-wrap msgid "macros, predefined" msgstr "predefinidas, macros" #. type: cindex #, no-wrap msgid "@option{-dM} option, list predefined macros" msgstr "@option{-dM}, opci@'on que lista las macros predefinidas" #. type: cindex #, no-wrap msgid "@option{dM} option, list predefined macros" msgstr "@option{dM}, opci@'on que lista de macros predefinidas" #. type: example #, no-wrap msgid "" "$ cpp -dM /dev/null\n" "#define __i586 1\n" "#define __WINT_MAX__ 4294967295U\n" "#define __ORDER_LITTLE_ENDIAN__ 1234\n" "#define __SIZE_MAX__ 4294967295U\n" ".......\n" msgstr "" "$ cpp -dM /dev/null\n" "#define __i586 1\n" "#define __WINT_MAX__ 4294967295U\n" "#define __ORDER_LITTLE_ENDIAN__ 1234\n" "#define __SIZE_MAX__ 4294967295U\n" ".......\n" #. type: Plain text msgid "" "Note that this list includes a small number of system-specific macros " "defined by @code{gcc} which do not use the double-underscore prefix. These " "non-standard macros can be disabled with the @option{-ansi} option of @code" "{gcc}." msgstr "" "Obs@'ervese que este listado incluye un peque@~no n@'umero de macros\n" "espec@'{@dotless{i}}ficas del sistema definidas por @code{gcc} que no\n" "usan el prefijo de doble subrayado. Estas macros no est@'andar pueden\n" "ser deshabilitadas con la opci@'on @option{-ansi} de @code{gcc}." #. type: cindex #, no-wrap msgid "system-specific predefined macros" msgstr "macros predefinidas espec@'{@dotless{i}}ficas del sistema" #. type: cindex #, no-wrap msgid "value, of macro" msgstr "valor, de macro" #. type: cindex #, no-wrap msgid "macros, defined with value" msgstr "macros, definidas con valor" #. type: Plain text msgid "" "In addition to being defined, a macro can also be given a value. This value " "is inserted into the source code at each point where the macro occurs. The " "following program uses a macro @code{NUM}, to represent a number which will " "be printed:" msgstr "" "Cuando es definida, una macro puede adem@'as tener asignado un\n" "valor. Este valor es sustituido dentro del c@'odigo fuente en cada\n" "lugar donde aparezca la macro. El siguiente programa usa la macro\n" "@code{NUM}, para representar que ser@'a impreso:" #. type: example #, no-wrap msgid "@verbatiminclude dtestval.c\n" msgstr "@verbatiminclude dtestval.es.c\n" #. type: Plain text msgid "" "Note that macros are not expanded inside strings---only the occurrence of " "@code{NUM} outside the string is substituted by the preprocessor." msgstr "" "Observe las macros no se expanden dentro de la cadena ---solo la\n" "ocurrencia de @code{NUM} fuera de la cadena es sustituida por el " "preprocesador." #. type: Plain text msgid "" "To define a macro with a value, the @option{-D} command-line option can be " "used in the form @option{-D@var{NAME}=@var{VALUE}}. For example, the " "following command line defines @code{NUM} to be 100 when compiling the " "program above:" msgstr "" "Para definir una macro con un valor, se usa la opci@'on @option{-D} en\n" "la l@'{@dotless{i}}nea de comandos en la forma\n" "@option{-D@var{NAME}=@var{VALUE}}. Por ejemplo, la siguiente\n" "l@'{@dotless{i}}nea de comandos define @code{NUM} a 100 mientras se\n" "compila el programa anterior:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -DNUM=100 dtestval.c\n" "$ ./a.out \n" "Value of NUM is 100\n" msgstr "" "$ gcc -Wall -DNUM=100 dtestval.es.c\n" "$ ./a.out\n" "El valor de NUM es 100\n" #. type: Plain text msgid "" "This example uses a number, but a macro can take values of any form. " "Whatever the value of the macro is, it is inserted directly into the source " "code at the point where the macro name occurs. For example, the following " "definition expands the occurrences of @code{NUM} to @code{2+2} during " "preprocessing:" msgstr "" "Este ejemplo usa un n@'umero, pero una macro puede tomar valores de\n" "cualquier forma. Cuando el valor de un macro est@'a asignado, @'este\n" "es insertado directamente dentro del c@'odigo fuente donde la macro\n" "aparezca. Por ejemplo, la siguiente definici@'on expande las ocurrencias\n" "de @code{NUM} a @code{2+2} durante el preprocesamiento:" # #. type: example #, no-wrap msgid "" "$ gcc -Wall -DNUM=\"2+2\" dtestval.c\n" "$ ./a.out \n" "Value of NUM is 4\n" msgstr "" "$ gcc -Wall -DNUM=\"2+2\" dtestval.es.c\n" "$ ./a.out\n" "El valor de NUM es 4" #. type: Plain text msgid "" "After the preprocessor has made the substitution @code{NUM @expansion{} 2+2} " "this is equivalent to compiling the following program:" msgstr "" "Una vez que el preprocesador ha realizado la sustituci@'on @code{NUM\n" "@expansion{} 2+2} es equivalente a compilar el siguiente programa:" #. type: example #, no-wrap msgid "@verbatiminclude dtestval2.c\n" msgstr "@verbatiminclude dtestval2.es.c\n" #. type: Plain text msgid "" "Note that it is a good idea to surround macros by parentheses whenever they " "are part of an expression. For example, the following program uses " "parentheses to ensure the correct precedence for the multiplication @code" "{10*NUM}:" msgstr "" "Observe que una buena idea es encerrar las macros entre par@'entesis\n" "siempre que formen parte de una expresi@'on. Por ejemplo, el programa\n" "siguiente usa par@'entesis para asegurar la correcta precedencia para\n" "la multiplicaci@'on @code{10*NUM}:" #. type: cindex #, no-wrap msgid "precedence, when using preprocessor" msgstr "precedencia, al usar preprocesador" #. type: example #, no-wrap msgid "@verbatiminclude dtestval3.c\n" msgstr "@verbatiminclude dtestval3.es.c\n" #. type: Plain text msgid "" "With these parentheses, it produces the expected result when compiled with " "the same command line as above:" msgstr "" "Con estos par@'entesis, se produce el resultado esperado cuando se\n" "compila con la misma l@'{@dotless{i}}nea de comandos anterior:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -DNUM=\"2+2\" dtestval3.c\n" "$ ./a.out \n" "Ten times NUM is 40\n" msgstr "" "$ gcc -Wall -DNUM=\"2+2\" dtestval3.es.c\n" "$ ./a.out\n" "Diez veces NUM es 40" #. type: Plain text msgid "" "Without parentheses, the program would produce the value @code{22} from the " "literal form of the expression @code{10*2+2 = 22}, instead of the desired " "value @code{10*(2+2) = 40}." msgstr "" "Sin los par@'entesis, el programa hubiera producido el valor @code{22}\n" "desde la forma literal de la expresi@'on @code{10*2+2 = 22}, en vez\n" "del valor deseado @code{10*(2+2) = 40}." #. type: Plain text msgid "" "When a macro is defined with @option{-D} alone, @code{gcc} uses a default " "value of @code{1}. For example, compiling the original test program with " "the option @option{-DNUM} generates an executable which produces the " "following output:" msgstr "" "Cuando una macro es definida solo con la opci@'on @option{-D},\n" "@code{gcc} usa el valor por defecto @code{1}. Por ejemplo, compilando\n" "el programa test original con la opci@'on @option{-DNUM} se genera un\n" "ejecutable que produce la siguiente salida:" #. type: cindex #, no-wrap msgid "default value, of macro defined with @option{-D}" msgstr "valor por defecto, de macro definido con @option{-D}" #. type: cindex #, no-wrap msgid "macros, default value of" msgstr "macros, valor por defecto de" #. type: cindex #, no-wrap msgid "preprocessor macros, default value of" msgstr "macros del preprocesador, valor por defecto de" #. type: example #, no-wrap msgid "" "$ gcc -Wall -DNUM dtestval.c\n" "$ ./a.out \n" "Value of NUM is 1\n" msgstr "" "$ gcc -Wall -DNUM dtestval.es.c\n" "$ ./a.out\n" "El valor de NUM es 1\n" #. type: cindex #, no-wrap msgid "quotes, for defining empty macro" msgstr "comillas, para definir una macro vac@'{@dotless{i}}a" #. type: Plain text msgid "" "A macro can be defined with an empty value using quotes on the command line, " "@code{-D@var{NAME}=\"\"}. Such a macro is still treated as @i{defined} by " "conditionals such as @code{#ifdef}, but expands to nothing." msgstr "" "Una macro puede ser definida con un valor vacio usando comillas en la\n" "l@'{@dotless{i}}nea de comandos, @code{-D@var{NAME}=\"\"}. Tal macro\n" "ser@'a tratada como @i{definida} por las instrucciones condicionales,\n" "tal como @code{#ifdef}, pero no se expande en nada." #. type: cindex #, no-wrap msgid "empty macro, compared with undefined macro" msgstr "macro vac@'{@dotless{i}}a, comparada con macro indefinida" #. type: cindex #, no-wrap msgid "undefined macro, compared with empty macro" msgstr "macro indefinida, comparada con macro vac@'{@dotless{i}}a" #. type: Plain text msgid "" "A macro containing quotes can be defined using shell-escaped quote " "characters. For example, the command-line option @code{-DMESSAGE='\"Hello, " "World!\"'} defines a macro @code{MESSAGE} which expands to the sequence of " "characters @code{\"Hello, World!\"}. The outer shell-quotes @code{'...'} " "protect the C-quotes of the string @code{\"Hello, World!\"}. For an " "explanation of the different types of quoting and escaping used in the shell " "see the ``@cite{GNU Bash Reference Manual}'', @ref{Further reading}." msgstr "" "Una macro que contenga comillas se puede definir usando el car@'acter de\n" "escape de la shell. Por ejemplo, la opci@'on\n" "@code{-DMESSAGE='\"@exclamdown{}Hola, Mundo!\"'} define una macro\n" "@code{MESSAGE} que se expandir@'a en la secuencia de caracteres\n" "@code{\"@exclamdown{}Hola, Mundo!\"}. Los caracteres de escape\n" "@code{'...'} protegen los comillas de la cadena\n" "@code{\"@exclamdown{}Hola, Mundo!\"}. Para una explicaci@'on de los\n" "diferentes tipos de comillas y secuencias de escape usandas en la\n" "shell vea ``@cite{GNU Bash Reference Manual}'',@ref{Lectura adicional}." #. type: cindex #, no-wrap msgid "shell quoting" msgstr "comillas en la shell" #. type: cindex #, no-wrap msgid "@option{-E} option, preprocess source files" msgstr "@option{-E}, opci@'on para preprocesar ficheros fuente" #. type: cindex #, no-wrap msgid "@option{E} option, preprocess source files" msgstr "@option{E}, opci@'on para preprocesar ficheros fuente" #. type: cindex #, no-wrap msgid "preprocessing source files, @option{-E} option" msgstr "preprocesamiento de ficheros fuente, opci@'on @option{-E}" #. type: Plain text msgid "" "It is possible to see the effect of the preprocessor on source files " "directly, using the @option{-E} option of @code{gcc}. For example, the file " "below defines and uses a macro @code{TEST}:" msgstr "" "Es posible ver el efecto del preprocesador en los archivos fuentes\n" "directamente, usando la opci@'on @option{-E} de @code{gcc}. Por\n" "ejemplo, el fichero siguiente define y usa la macro @code{TEST}:" #. type: example #, no-wrap msgid "@verbatiminclude test.c\n" msgstr "@verbatiminclude test.es.c\n" #. type: Plain text msgid "" "If this file is called @file{test.c} the effect of the preprocessor can be " "seen with the following command line:" msgstr "" "Si este fichero se llama @file{test.es.c} el efecto del preprocesador\n" "puede ser visto con la siguiente l@'{@dotless{i}}nea de comandos:" #. type: example #, no-wrap msgid "" "$ gcc -E test.c\n" "# 1 \"test.c\"\n" "# 1 \"\"\n" "# 1 \"\"\n" "# 1 \"test.c\"\n" "\n" msgstr "" "$ gcc -E test.es.c\n" "# 1 \"test.es.c\"\n" "# 1 \"\"\n" "# 1 \"\"\n" "# 1 \"test.es.c\"\n" "\n" #. type: example #, no-wrap msgid "const char str[] = \"Hello, World!\";\n" msgstr "const char str[] = \"@exclamdown{}Hola, Mundo!\";\n" #. type: Plain text msgid "" "The @option{-E} option causes @code{gcc} to run the preprocessor, display " "the expanded output, and then exit without compiling the resulting source " "code. The value of the macro @code{TEST} is substituted directly into the " "output, producing the sequence of characters @code{const char str[] = " "\"Hello, World!\" ;}." msgstr "" "La opci@'on @option{-E} causa que @code{gcc} ejecute el preprocesador,\n" "muestre la salida expandida, y termine sin compilar el c@'odigo fuente\n" "resultante. El valor de la macro @code{TEST} es sustituido\n" "directamente en la salida, produciendo la secuencia de caracteres\n" "@code{const char str[] = \"@exclamdown{}Hola, Mundo!\" ;}." #. type: cindex #, no-wrap msgid "line numbers, recorded in preprocessed files" msgstr "n@'umeros de l@'{@dotless{i}}nea, grabados en ficheros preprocesados" #. type: Plain text msgid "" "The preprocessor also inserts lines recording the source file and line " "numbers in the form @code{# @var{line-number} \"@var{source-file}\"}, to aid " "in debugging and allow the compiler to issue error messages referring to " "this information. These lines do not affect the program itself." msgstr "" "El preprocesador adem@'as inserta l@'{@dotless{i}}neas de registro del\n" "archivo fuente y el n@'umero de l@'{@dotless{i}}nea en la forma\n" "@code{# @var{n@'umero-de-l@'{@dotless{i}}nea} \"@var{archivo-fuente}\"},\n" "para ayudar en la depuraci@'on y permite al compilador mostrar los\n" "mensajes de error referentes a esta informaci@'on. Estas\n" "l@'{@dotless{i}}neas no afectan al programa en s@'{@dotless{i}}." #. type: Plain text msgid "" "The ability to see the preprocessed source files can be useful for examining " "the effect of system header files, and finding declarations of system " "functions. The following program includes the header file @file{stdio.h} to " "obtain the declaration of the function @code{printf}:" msgstr "" "La posibilidad de ver los archivos fuentes precompilados puede\n" "resultar @'util para examinar los efectos de los archivos de cabeceras\n" "del sistema, y encontrar las declaraciones de las funciones del\n" "sistema. El siguiente programa incluye el archivo de cabecera\n" "@file{stdio.h} para obtener la declaraci@'on de la funci@'on @code{printf}:" #. type: Plain text msgid "" "It is possible to see the declarations from the included header file by " "preprocessing the file with @code{gcc -E}:" msgstr "" "Es posible examinar las declaraciones incluidas en los archivos de\n" "cabeceras preprocesando el archivo con @code{gcc -E}:" #. type: example #, no-wrap msgid "$ gcc -E hello.c\n" msgstr "$ gcc -E hola.es.c\n" #. type: Plain text msgid "On a GNU system, this produces output similar to the following:" msgstr "En un sistema GNU, esto produce una salida similar a lo siguiente:" #. type: example #, no-wrap msgid "" "# 1 \"hello.c\"\n" "# 1 \"/usr/include/stdio.h\" 1 3\n" " \n" msgstr "" "# 1 \"hola.es.c\"\n" "# 1 \"/usr/include/stdio.h\" 1 3\n" #. type: example #, no-wrap msgid "" "extern FILE *stdin;\t\t \n" "extern FILE *stdout;\t\t \n" "extern FILE *stderr;\t\t \n" " \n" msgstr "" "extern FILE *stdin;\t\t \n" "extern FILE *stdout;\t\t \n" "extern FILE *stderr;\t\t \n" " \n" #. type: example #, no-wrap msgid "" "extern int fprintf (FILE * __stream, \n" " const char * __format, ...) ;\n" "extern int printf (const char * __format, ...) ;\n" "\n" msgstr "" "extern int fprintf (FILE * __stream, \n" " const char * __format, ...) ;\n" "extern int printf (const char * __format, ...) ;\n" "\n" #. type: example #, no-wrap msgid "" " @r{@i{[ ... additional declarations ... ]}}\n" "\n" msgstr " @r{@i{[ ... declaraciones adicionales ... ]}}\n" #. type: example #, no-wrap msgid "" "# 1 \"hello.c\" 2\n" "\n" msgstr "# 1 \"hola.es.c\" 2\n" #. type: example #, no-wrap msgid "" "int\n" "main (void)\n" "@{\n" " printf (\"Hello, world!\\n\");\n" " return 0;\n" "@}\n" msgstr "" "int\n" "main (void)\n" "@{\n" " printf (\"@exclamdown{}Hola, Mundo!\");\n" " return 0;\n" "@}\n" #. type: Plain text msgid "" "The preprocessed system header files usually generate a lot of output. This " "can be redirected to a file, or saved more conveniently using the @code{gcc} " "@option{-save-temps} option:" msgstr "" "Los archivos de cabeceras del sistema preprocesados suelen generar una\n" "extensa salida. @'Esta puede ser redirigida a un archivo, o almacenada\n" "m@'as convenientemente usando la opci@'on @option{-save-temps}: " #. type: cindex #, no-wrap msgid "@option{-save-temps} option, keeps intermediate files" msgstr "@option{-save-temps}, opci@'on que guarda ficheros intermedios" #. type: cindex #, no-wrap msgid "@option{save-temps} option, keeps intermediate files" msgstr "@option{save-temps}, opci@'on que guarda ficheros intermedios" #. type: cindex #, no-wrap msgid "preprocessed files, keeping" msgstr "ficheros preprocesados, guardando" #. type: cindex #, no-wrap msgid "intermediate files, keeping" msgstr "ficheros intermedios, guardando" #. type: cindex #, no-wrap msgid "temporary files, keeping" msgstr "ficheros temporales, guardando" #. type: example #, no-wrap msgid "$ gcc -c -save-temps hello.c\n" msgstr "$ gcc -c -save-temps hola.es.c" #. type: Plain text msgid "" "After running this command, the preprocessed output will be available in the " "file @file{hello.i}. The @option{-save-temps} option also saves @file{.s} " "assembly files and @file{.o} object files in addition to preprocessed @file{." "i} files." msgstr "" "Despu@'es de ejecutar este comando, la salida del preprocesador\n" "estar@'a disponible en el archivo @file{hola.i}. La opci@'on\n" "@option{-save-temps} adem@'as almacena los archivos de ensamblado\n" "@file{.s} y los archivos objetos @file{.o} adem@'as de los archivos\n" "preprocesados @file{.i}." #. type: cindex #, no-wrap msgid "debugging, compilation flags" msgstr "depurando, flags de compilaci@'on" #. type: cindex #, no-wrap msgid "@option{-g} option, enable debugging" msgstr "@option{-g}, opci@'on que activa la depuraci@'on" #. type: cindex #, no-wrap msgid "@option{g} option, enable debugging" msgstr "@option{g}, opci@'on que activa la depuraci@'on" #. type: cindex #, no-wrap msgid "compilation, for debugging" msgstr "compilaci@'on, para depuraci@'on" #. type: Plain text msgid "" "Normally, an executable file does not contain any references to the original " "program source code, such as variable names or line-numbers---the executable " "file is simply the sequence of machine code instructions produced by the " "compiler. This is insufficient for debugging, since there is no easy way to " "find the cause of an error if the program crashes." msgstr "" "Normalmente, un archivo ejecutable no contiene ninguna referencia del\n" "archivo fuente original, tal como nombres de variables o n@'umeros de\n" "l@'{@dotless{i}}nea ---el archivo ejecutable es una simple secuencia\n" "de instrucciones en c@'odigo m@'aquina producidas por el\n" "compilador. Esto es insuficiente para depuraci@'on, ya que no es una\n" "tarea f@'acil la forma de encontrar la causa del fallo en un programa." #. type: code{#1} #, no-wrap msgid "gdb" msgstr "gdb" #. type: cindex #, no-wrap msgid "debugging, with @code{gdb}" msgstr "depuraci@'on, con @code{gdb}" #. type: cindex #, no-wrap msgid "GNU debugger, @code{gdb}" msgstr "GNU debugger, @code{gdb}" #. type: cindex #, no-wrap msgid "symbol table" msgstr "tabla de s@'{@dotless{i}}mbolos" #. type: cindex #, no-wrap msgid "executable, symbol table stored in" msgstr "ejecutable, tabla de s@'{@dotless{i}}mbolos almacenada en" #. type: Plain text msgid "" "GCC provides the @option{-g} @dfn{debug option} to store additional " "debugging information in object files and executables. This debugging " "information allows errors to be traced back from a specific machine " "instruction to the corresponding line in the original source file. The " "execution of a program compiled with @option{-g} can also be followed in a " "debugger, such as the GNU Debugger @code{gdb} (for more information, see " "``@cite{Debugging with GDB: The GNU Source-Level Debugger}'', @ref{Further " "reading}). Using a debugger allows the values of variables to be examined " "while the program is running." msgstr "" "GCC proporciona la @dfn{opci@'on de depuraci@'on} @option{-g} para\n" "guardar informaci@'on de depuraci@'on en los archivos objetos y\n" "ejecutables. Esta informaci@'on de depuraci@'on permite seguir la\n" "pista de los errores desde una instrucci@'on espec@'{@dotless{i}}fica\n" "a la correspondiente l@'{@dotless{i}}nea en el c@'odigo fuente\n" "original. La ejecuci@'on de un programa compilado con @option{-g}\n" "puede ser seguido por un depurador, tal como el Depurador GNU\n" "@code{gdb} (para m@'as informac@'on vea ``@cite{Debugging with GDB:\n" "The GNU Source-Level Debugger}'', @ref{Lectura adicional}). Usando un\n" "depurador es posible examinar los valores de las variables mientras\n" "est@'a en ejecuci@'on un programa. " #. type: Plain text msgid "" "The debug compilation option works by storing the names and source code line-" "numbers of functions and variables in a @dfn{symbol table} in the object " "file or executable." msgstr "" "La opci@'on de depuraci@'on del compilador funciona almacenando los\n" "nombres de funciones y variables y las l@'{@dotless{i}}neas del\n" "c@'odigo fuente en una @dfn{tabla de s@'{@dotless{i}}mbolos} en el\n" "archivo objeto o ejecutable." #. type: section #, no-wrap msgid "Examining core files" msgstr "Examinando archivos core" #. type: section #, no-wrap msgid "Displaying a backtrace" msgstr "Mostrando un rastreo" #. type: section #, no-wrap msgid "Setting a breakpoint" msgstr "Poniendo un punto de ruptura" #. type: section #, no-wrap msgid "Stepping through the program" msgstr "Paso a paso a trav@'es de un programa" #. type: section #, no-wrap msgid "Modifying variables" msgstr "Modificando variables" #. type: section #, no-wrap msgid "Continuing execution" msgstr "Continuando la ejecuci@'on" #. type: node #, no-wrap msgid "More information about GDB" msgstr "M@'as informaci@'on de GDB" #. type: cindex #, no-wrap msgid "core file, examining" msgstr "fichero core, examinando" #. type: cindex #, no-wrap msgid "crashes, saved in core file" msgstr "fallos, salvado en archivo core" #. type: cindex #, no-wrap msgid "program crashes, saved in core file" msgstr "fallos de programa, salvado en archivo core" #. type: cindex #, no-wrap msgid "examining core files" msgstr "examinando ficheros core" #. type: Plain text msgid "" "In addition to allowing programs to be run under the debugger, an important " "benefit of the @option{-g} option is the ability to examine the cause of a " "program crash from a ``core dump''." msgstr "" "Adicionalmente a permitir que un programa se ejecute en un depurador,\n" "un importante beneficio de la opci@'on @option{-g} es que permite\n" "examinar la causa del fallo de un programa a trav@'es de un ``core\n" "dump''." #. type: cindex #, no-wrap msgid "termination, abnormal (@code{core dumped})" msgstr "terminaci@'on, anormal (@code{core dumped})" #. type: Plain text msgid "" "When a program exits abnormally (i.e. crashes) the operating system can " "write out a @dfn{core file} (usually named @file{core}) which contains the " "in-memory state of the program at the time it crashed. This file is often " "referred to as a @dfn{core dump}.@footnote{The terminology dates back to the " "time of magnetic core memory.} Combined with information from the symbol " "table produced by @option{-g}, the core dump can be used to find the line " "where the program stopped, and the values of its variables at that point." msgstr "" "Cuando un programa termina de forma anormal (p.e. un fallo) el\n" "sistema operativo puede escribir un @dfn{core file} (habitualmente\n" "llamado @file{core}) que contiene el estado de memoria del programa en\n" "el momento del fallo. Este fichero es a menudo referido como un\n" "@dfn{core dump}.@footnote{Esta terminolog@'{@dotless{i}}a data de los\n" "tiempos de las memorias magn@'eticas.} Combinada con la informaci@'on\n" "de la tabla de s@'{@dotless{i}}mbolos producida por la opci@'on\n" "@option{-g}, se puede usar el core dump para encontrar la\n" "l@'{@dotless{i}}nea donde el programa se par@'o, y los valores de las\n" "variables en este punto." #. type: cindex #, no-wrap msgid "deployment, options for" msgstr "despliegue, opciones para" #. type: Plain text msgid "" "This is useful both during the development of software and after " "deployment---it allows problems to be investigated when a program has " "crashed ``in the field''." msgstr "" "Esto es muy usado tanto durante el desarrollo de software como\n" "despu@'es del desarrollo ---permite investigar los problemas cuando un\n" "programa falla ``a pi@'e de campo''." #. type: Plain text msgid "" "Here is a simple program containing an invalid memory access bug, which we " "will use to produce a core file:" msgstr "" "Aqu@'{@dotless{i}} hay un simple ejemplo de un programa que contiene\n" "un fallo de acceso inv@'alido a memoria, el cual se usar@'a para\n" "producir un archivo core dump:" #. type: example #, no-wrap msgid "@verbatiminclude null.c\n" msgstr "@verbatiminclude null.es.c\n" #. type: cindex #, no-wrap msgid "dereferencing, null pointer" msgstr "desreferenciando, puntero nulo" #. type: cindex #, no-wrap msgid "null pointer" msgstr "puntero nulo" #. type: Plain text msgid "" "The program attempts to dereference a null pointer @code{p}, which is an " "invalid operation. On most systems, this will cause a crash. @footnote" "{Historically, a null pointer corresponded to memory location 0, which is " "typically restricted to the operating system kernel. In practice this is " "not always how a null pointer works, but the result is usually the same.}" msgstr "" "Este programa intenta referenciar un puntero nulo @code{p}, lo cual es\n" "una operaci@'on inv@'alida. En la mayor@'{@dotless{i}}a de lo sistemas\n" "operativos, esto causa un fallo del\n" "programa. @footnote{Hist@'oricamente, un puntero nulo\n" "correspond@'{@dotless{i}}a con la posici@'on 0 de memoria, la cual es\n" "normalmente restringida por el kernel del sistema operativo. En la\n" "pr@'actica no siempre es as@'{@dotless{i}} como se trata un puntero\n" "nulo, pero el resultado es habitualmente el mismo.} " #. type: Plain text msgid "" "In order to be able to find the cause of the crash later, we will need to " "compile the program with the @option{-g} option:" msgstr "" "Para que sea posible encontrar la causa de un posterior fallo, se\n" "necesitar@'a compilar el programa con la opci@'on @option{-g}:" #. type: example #, no-wrap msgid "$ gcc -Wall -g null.c\n" msgstr "$ gcc -Wall -g null.es.c\n" #. type: Plain text msgid "" "Note that a null pointer will only cause a problem at run-time, so the " "option @option{-Wall} does not produce any warnings." msgstr "" "Observe que el puntero nulo s@'olo causar@'a un problema en tiempo de\n" "ejecuci@'on, as@'{@dotless{i}} la opci@'on @option{-Wall} no\n" "producir@'a ning@'un aviso." #. type: Plain text msgid "" "Running the executable file on an x86 GNU/Linux system will cause the " "operating system to terminate the program abnormally:" msgstr "" "Haciendo correr el archivo ejecutable en un sistema x86 GNU/Linux\n" "causar@'a que el sistema operativo lo finalice de forma anormal:" #. type: cindex #, no-wrap msgid "segmentation fault" msgstr "segmentation fault" #. type: example #, no-wrap msgid "" "$ ./a.out \n" "Segmentation fault (core dumped)\n" msgstr "" "$ ./a.out \n" "Segmentation fault (core dumped)\n" #. type: Plain text msgid "" "Whenever the error message @samp{core dumped} is displayed, the operating " "system should produce a file called @file{core} in the current directory." "@footnote{Some systems, such as FreeBSD and Solaris, can also be configured " "to write core files in specific directories, e.g. @file{/var/coredumps/}, " "using the @code{sysctl} or @code{coreadm} commands.} This core file contains " "a complete copy of the pages of memory used by the program at the time it " "was terminated. Incidentally, the term @dfn{segmentation fault} refers to " "the fact that the program tried to access a restricted memory ``segment'' " "outside the area of memory which had been allocated to it." msgstr "" "Siempre que aparezca el mensaje @samp{core dumped}, el sistema\n" "operativo producir@'a un archivo denominado @file{core} en el\n" "directorio en curso. @footnote{Algunos sistemas, tales como FreeBSD y\n" "Solaris, se pueden configurados para escribir los archivos core en\n" "directorios espec@'{@dotless{i}}ficos, p.e. @file{/var/coredumps/},\n" "usando los comandos @code{sysctl} y @code{coreadm}.} Este archivo core\n" "contiene una copia completa de las p@'aginas de memoria que el\n" "programa manten@'{@dotless{i}}a en el momento de su finalizaci@'on. A\n" "prop@'osito, el t@'ermino @dfn{segmentation fault} se refiere al hecho\n" "de que el programa intent@'o un acceso a un ``segmento'' de memoria\n" "restringido fuera del @'area de memoria que tiene reservada para\n" "@'el." #. type: cindex #, no-wrap msgid "core file, not produced" msgstr "fichero core, no se produce" #. type: cindex #, no-wrap msgid "@command{ulimit} command" msgstr "comando @command{ulimit}" #. type: Plain text msgid "" "Some systems are configured not to write core files by default, since the " "files can be large and rapidly fill up the available disk space on a " "system. In the @cite{GNU Bash} shell the command @code{ulimit -c} controls " "the maximum size of core files. If the size limit is zero, no core files " "are produced. The current size limit can be shown by typing the following " "command:" msgstr "" "Algunos sistemas est@'an configurados para no escribir archivos core\n" "por defecto, debido a que los archivos pueden ser muy grandes y\n" "r@'apidamente ocupan el espacio disponible en los discos de un\n" "sistema. En la shell @cite{GNU Bash} el comando @code{ulimit -c}\n" "controla el tama@~no m@'aximo de los archivos core. Si el\n" "l@'{@dotless{i}}mite de tama@~no es 0, no se producir@'an archivos\n" "core. El tama@~no l@'{@dotless{i}}mite actual se puede mostrar\n" "introduciendo el siguiente comando:" #. type: cindex #, no-wrap msgid "@code{tcsh}, limit command" msgstr "@code{tcsh}, comando limit" #. type: example #, no-wrap msgid "" "$ ulimit -c\n" "0\n" msgstr "" "$ ulimit -c\n" "0\n" #. type: Plain text msgid "" "If the result is zero, as shown above, then it can be increased with the " "following command to allow core files of any size to be written:@footnote" "{This example uses the @code{ulimit} command in the GNU Bash shell. On " "other systems the usage of the @code{ulimit} command may vary, or have a " "different name (the @code{tcsh} shell uses the @code{limit} command " "instead). The size limit for core files can also be set to a specific value " "in kilobytes.}" msgstr "" "Si el resultado es cero, como se mostr@'o anteriormente, entonces\n" "puede ser incrementado con el siguiente comando para permitir escribir\n" "archivos core de cualquier tama@~no: @footnote{Este ejemplo usa el\n" "comando @code{ulimit} en la Bash shell GNU. En otros sistemas\n" "operativos el uso de @code{ulimit} puede variar, y tener un nombre\n" "diferente (la shell @code{tcsh} a su vez, usa el nombre\n" "@code{limit}). El tama@~no l@'{@dotless{i}}mite de los archivos core\n" "puede ser puesto a un valor espec@'{@dotless{i}}fico en kilobytes.}" #. type: example #, no-wrap msgid "$ ulimit -c unlimited\n" msgstr "$ ulimit -c unlimited\n" #. type: Plain text msgid "" "Note that this setting only applies to the current shell. To set the limit " "for future sessions the command should be placed in an appropriate login " "file, such as @file{.bash_profile} for the GNU Bash shell." msgstr "" "Observe que esta configuraci@'on solo aplica en la shell actual. Para\n" "poner l@'{@dotless{i}}mite en futuras sesiones el comando se deber@'a\n" "poner en el archivo adecuado de entrada al sistema, tal como\n" "@file{.bash_profile} para la Bash shell GNU." #. type: cindex #, no-wrap msgid "@code{bash} profile file" msgstr "fichero @code{bash} profile" #. type: cindex #, no-wrap msgid "@code{gdb}, debugging core file with" msgstr "@code{gdb}, depurando ficheros core con" #. type: Plain text msgid "" "Core files can be loaded into the GNU Debugger @code{gdb} with the following " "command:" msgstr "" "Los archivos core pueden ser cargados por el Depurador GNU @code{gdb}\n" "con el siguiente comando:" #. type: example #, no-wrap msgid "$ gdb @var{EXECUTABLE-FILE} @var{CORE-FILE}\n" msgstr "$ gdb @var{FICHERO-EJECUTABLE} @var{FICHERO-CORE}\n" #. type: Plain text msgid "" "Note that both the original executable file and the core file are required " "for debugging---it is not possible to debug a core file without the " "corresponding executable. In this example, we can load the executable and " "core file with the command:" msgstr "" "Observe que tanto el archivo ejecutable original como el archivo core\n" "son requeridos para la depuraci@'on ---no es posible depurar un\n" "archivo core sin el correspondiente ejecutable. En este ejemplo,\n" "podemos cargar los archivos ejecutable y core con el comando:" #. type: example #, no-wrap msgid "$ gdb a.out core\n" msgstr "$ gdb a.out core\n" #. type: Plain text msgid "" "The debugger immediately begins printing diagnostic information, and shows a " "listing of the line where the program crashed (line 13):" msgstr "" "El depurador inmediatamente comienza a imprimir informaci@'on de\n" "diagn@'ostico, y muestra un listado de la l@'{@dotless{i}}nea donde el\n" "programa ha fallado (l@'{@dotless{i}}nea 13):" #. type: example #, no-wrap msgid "" "$ gdb a.out core\n" "Core was generated by `./a.out'.\n" "Program terminated with signal 11, Segmentation fault.\n" "Reading symbols from /lib/libc.so.6...done.\n" "Loaded symbols for /lib/libc.so.6\n" "Reading symbols from /lib/ld-linux.so.2...done.\n" "Loaded symbols for /lib/ld-linux.so.2\n" "#0 0x080483ed in foo (p=0x0) at null.c:13\n" "13 int y = *p;\n" "(gdb)\n" msgstr "" "$ gdb a.out core\n" "Core was generated by `./a.out'.\n" "Program terminated with signal 11, Segmentation fault\n" "Reading symbols from /lib/libc.so.6...done.\n" "Loaded symbols for /lib/libc.so.6\n" "Reading symbols from /lib/ld-linux.so.2...done.\n" "Loaded symbols for /lib/ld-linux.so.2\n" "#0 0x080483ed in foo (p=0x0) at null.es.c:13\n" "13 int y = *p;\n" "(gdb)" #. type: Plain text msgid "" "The final line @code{(gdb)} is the GNU Debugger prompt---it indicates that " "further commands can be entered at this point.@footnote{The details of the " "diagnostic output may vary slightly depending on which version of @code{gdb} " "you are using.}" msgstr "" "La l@'{@dotless{i}}nea final @code{(dbg)} es el prompt del depurador\n" "GNU ---indica que se pueden introducir posteriores comandos en este\n" "punto.@footnote{Los detalles de la salida de diagn@'ostico pueden\n" "variar ligeramente dependiendo de que versi@'on de @code{gdb} est@'e\n" "usando.}" #. type: Plain text msgid "" "To investigate the cause of the crash, we display the value of the pointer " "@code{p} using the debugger @code{print} command:" msgstr "" "Para investigar la causa del fallo, mostramos el valor del puntero\n" "@code{p} usando el comando @code{print} del depurador:" #. type: cindex #, no-wrap msgid "@code{print} debugger command" msgstr "@code{print} comando para depurar" #. type: example #, no-wrap msgid "" "(gdb) print p\n" "$1 = (int *) 0x0\n" msgstr "" "(gdb) print p\n" "$1 = (int *) 0x0\n" #. type: Plain text msgid "" "This shows that @code{p} is a null pointer (@code{0x0}) of type @samp{int " "*}, so we know that dereferencing it with the expression @code{*p} in this " "line has caused the crash." msgstr "" "Se muestra que @code{p} es un puntero nulo (@code{0x0}) del tipo\n" "@samp{int *}, as@'{@dotless{i}} nosotros sabemos que la referencia a\n" "@'el con la expresi@'on @code{p} en esta l@'{@dotless{i}}nea a causado\n" "el fallo." #. type: cindex #, no-wrap msgid "displaying a backtrace" msgstr "mostrando una traza" #. type: cindex #, no-wrap msgid "backtrace, displaying" msgstr "traza, mostrando" #. type: cindex #, no-wrap msgid "stack backtrace, displaying" msgstr "pila de rastreo, mostrando" #. type: cindex #, no-wrap msgid "@code{backtrace}, debugger command" msgstr "@code{backtrace}, comando para depurar" #. type: Plain text msgid "" "The debugger can also show the function calls and arguments up to the " "current point of execution---this is called a @dfn{stack backtrace} and is " "displayed with the command @code{backtrace}:" msgstr "" "El depurador puede mostrar las llamadas a funciones y sus argumentos\n" "hasta el punto actual de ejecuci@'on ---esto es llamado @dfn{pila de\n" "rastreo} (stack backtrace) y se muestra con el comando\n" "@code{backtrace}:" #. type: example #, no-wrap msgid "" "(gdb) backtrace\n" "#0 0x080483ed in foo (p=0x0) at null.c:13\n" "#1 0x080483d9 in main () at null.c:7\n" msgstr "" "(gdb) backtrace\n" "#0 0x080483ed in foo (p=0x0) at null.es.c:13\n" "#1 0x080483d9 in main () at null.es.c:7\n" #. type: Plain text msgid "" "In this case, the backtrace shows that the crash occurred at line 13 after " "the function @code{foo} was called from @code{main} with an argument of @code" "{p=0x0} at line 7 in @file{null.c}. It is possible to move to different " "levels in the stack trace, and examine their variables, using the debugger " "commands @code{up} and @code{down}." msgstr "" "En este caso, la pila de llamadas muestra que el fallo ocurri@'o en la\n" "l@'{@dotless{i}}nea 13 despu@'es de que la funci@'on @code{foo} fuera\n" "llamada desde @code{main} con el argumento @code{p=0x0} en la\n" "l@'{@dotless{i}}nea 7 de @file{null.es.c}. Es posible moverse por los\n" "diferentes niveles de la pila de llamadas, usando los comandos del\n" "depurador @code{up} y @code{down}." #. type: cindex #, no-wrap msgid "@code{break}, command in @code{gdb}" msgstr "@code{break}, comando en @code{gdb}" #. type: cindex #, no-wrap msgid "breakpoints, defined" msgstr "puntos de ruptura, definici@'on de" #. type: cindex #, no-wrap msgid "stopping execution, with breakpoints in @code{gdb}" msgstr "parando la ejecuci@'on, con puntos de ruptura en @code{gdb}" #. type: Plain text msgid "" "A @dfn{breakpoint} stops the execution of a program and returns control to " "the debugger, where its variables and memory can be examined before " "continuing. Breakpoints can be set for specific functions, lines or memory " "locations with the @code{break} command." msgstr "" "Un @dfn{punto de ruptura} (breakpoint) detiene la ejecuci@'on del\n" "programa y devuelve el control al depurador, donde las variables y la\n" "memoria pueden ser examinadas antes de continuar. Los puntos de\n" "ruptura pueden ponerse en funciones espec@'{@dotless{i}}ficas,\n" "l@'{@dotless{i}}neas o localizaciones de memoria con el comando\n" "@code{break}." #. type: Plain text msgid "" "To set a breakpoint on a specific function, use the command @code{break @var" "{function-name}}. For example, the following command sets a breakpoint at " "the start of the @code{main} function in the program above:" msgstr "" "Para poner un breakpoint en una funci@'on, usa el comando @code{break\n" "@var{function-name}}. Por ejemplo, el siguiente comando pone un\n" "breakpoint al inicio de la funci@'on @code{main} en el programa\n" "anterior:" #. type: example #, no-wrap msgid "" "$ gdb a.out\n" "(gdb) break main\n" "Breakpoint 1 at 0x80483c6: file null.c, line 6.\n" msgstr "" "$ gdb a.out\n" "(gdb) break main\n" "Breakpoint 1 at 0x80483c6: file null.es.c, line 6.\n" #. type: Plain text msgid "" "The debugger will now take control of the program when the function @code" "{main} is called. Since the @code{main} function is the first function to " "be executed in a C program the program will stop immediately when it is run:" msgstr "" "El depurador tomar@'a el control del programa cuando la funci@'on\n" "@code{main} sea llamada. Como la funci@'on @code{main} es la primera\n" "funci@'on en ser ejecutada en un programa C, el programa se detendr@'a\n" "inmediatamente cuando se ejecute:" #. type: example #, no-wrap msgid "" "(gdb) run\n" "Starting program: a.out \n" "Breakpoint 1, main () at null.c:6\n" "6 int *p = 0; /* null pointer */\n" "(gdb)\n" msgstr "" "(gdb) run\n" "Starting program: a.out \n" "Breakpoint 1, main () at null.es.c:6\n" "6 int *p = 0; /* null pointer */\n" "(gdb)\n" #. type: Plain text msgid "" "The display shows the line that will be executed next (the line number is " "shown on the left). The breakpoint stops the program @emph{before} the line " "is executed, so at this stage the pointer @code{p} is undefined and has not " "yet been set to zero." msgstr "" "La consola muestra la l@'{@dotless{i}}nea que ser@'a ejecutada en\n" "siguiente lugar (el n@'umero de l@'{@dotless{i}}nea se muestra a la\n" "izquierda). El breakpoint detiene el programa @emph{antes} de\n" "ejecutar la l@'{@dotless{i}}nea, en este instante el puntero @code{p}\n" "est@'a indefinido y no ha sido puesto a cero a@'un." #. type: cindex #, no-wrap msgid "@code{step}, command in @code{gdb}" msgstr "@code{step}, comando en @code{gdb}" #. type: cindex #, no-wrap msgid "@code{next}, command in @code{gdb}" msgstr "@code{next}, comando en @code{gdb}" #. type: Plain text msgid "" "To move forward and execute the line displayed above, use the command @code" "{step}:" msgstr "" "Para avanzar y ejecutar la l@'{@dotless{i}}nea mostrada anteriormente,\n" "usa el comando @code{step}:" #. type: example #, no-wrap msgid "" "(gdb) step\n" "7 return foo (p);\n" msgstr "" "(gdb) step\n" "7 return foo (p);\n" #. type: Plain text msgid "" "After executing line 6, the debugger displays the next line to be executed. " "The pointer @code{p} will now have been set to zero (null):" msgstr "" "Despu@'es de ejecutar la l@'{@dotless{i}}nea 6, el depurador muestra\n" "la siguiente l@'{@dotless{i}}nea que ser@'a ejecutada. El puntero\n" "@code{p} est@'a ahora puesto a cero (null):" #. type: Plain text msgid "" "The command @code{step} will follow the execution of the program " "interactively through any functions that are called in the current line. If " "you want to move forward without tracing these calls, use the command @code" "{next} instead." msgstr "" "El comando @code{step} continuar@'a la ejecuci@'on del programa\n" "interactivamente a trav@'es de cualquier funci@'on que sea invocada en\n" "la l@'{@dotless{i}}nea actual. Si desea avanzar sin hacer un\n" "seguimiento de estas llamadas a funciones, use en cambio el comando\n" "@code{next}." #. type: cindex #, no-wrap msgid "@code{set}, command in @code{gdb}" msgstr "@code{set}, comando en @code{gdb}" #. type: Plain text msgid "" "To temporarily fix the null pointer bug discovered above, we can change the " "value of @code{p} in the running program using the @code{set variable} " "command." msgstr "" "Para arreglar temporalmente el fallo del puntero nulo descubierto\n" "anteriormente, podemos cambiar el valor de @code{p} en el programa en\n" "ejecuci@'on usando el comando @code{set variable}." #. type: Plain text msgid "" "Variables can be set to a specific value, or to the result of an expression, " "which may include function calls. This powerful feature allows functions in " "a program to be tested interactively through the debugger." msgstr "" "Las variables pueden ser inicializadas a un valor\n" "espec@'{@dotless{i}}fico, o ser el resultado de una expresi@'on, la\n" "cual puede incluir llamadas a funciones. Esta poderosa\n" "caracter@'{@dotless{i}}stica permite a las funciones de un programa\n" "ser testeadas interactivamente a trav@'es del depurador." #. type: Plain text msgid "" "In this case we will interactively allocate some memory for the pointer @code" "{p} using the function @code{malloc}, storing the value 255 in the resulting " "location:" msgstr "" "En este caso, interactivamente, se reservar@'a algo de memoria para el\n" "puntero @code{p} usando la funci@'on @code{malloc}, almacenando el\n" "valor 255 en la localizaci@'on de memoria resultante:" #. type: example #, no-wrap msgid "" "(gdb) set variable p = malloc(sizeof(int))\n" "(gdb) print p\n" "$2 = (int *) 0x40013f98 @r{(address allocated by @code{malloc})}\n" "(gdb) set variable *p = 255\n" "(gdb) print *p\n" "$3 = 255\n" msgstr "" "(gdb) set variable p = malloc(sizeof(int))\n" "(gdb) print p\n" "$2 = (int *) 0x40013f98 @r{(direcci@'on reservada por @code{malloc})}\n" "(gdb) set variable *p = 255\n" "(gdb) print *p\n" "$3 = 255" #. type: Plain text msgid "" "If we now continue stepping through the program with the new value of @code" "{p} the previous segmentation fault will not occur:" msgstr "" "Si ahora continuamos avanzando en el programa con el nuevo valor de\n" "@code{p} el anterior fallo de segmentaci@'on no se producir@'a:" #. type: example #, no-wrap msgid "" "(gdb) step\n" "foo (p=0x40013f98) at null.c:13\n" "13 int y = *p;\n" "(gdb) step\n" "14 return y;\n" msgstr "" "(gdb) step\n" "foo (p=0x40013f98) at null.es.c:13\n" "13 int y = *p;\n" "(gdb) step\n" "14 return y;\n" #. type: cindex #, no-wrap msgid "@code{finish}, command in @code{gdb}" msgstr "@code{finish}, comando en @code{gdb}" #. type: cindex #, no-wrap msgid "@code{continue}, command in @code{gdb}" msgstr "@code{continue}, comando en @code{gdb}" #. type: Plain text msgid "" "The command @code{finish} continues execution up to the end of the current " "function, displaying the return value:" msgstr "" "El comando @code{finish} continua la ejecuci@'on hasta el final de la\n" "actual funci@'on, mostrando el valor de retorno:" #. type: example #, no-wrap msgid "" "(gdb) finish\n" "Run till exit from #0 0x08048400 in foo (p=0x40013f98) \n" "at null.c:15\n" "0x080483d9 in main () at null.c:7\n" "7 return foo (p);\n" "Value returned is $13 = 255\n" msgstr "" "(gdb) finish\n" "Run till exit from #0 0x08048400 in foo (p=0x40013f98)\n" "at null.es.c:15\n" "0x080483d9 in main () at null.es.c:7\n" "7 return foo (p);\n" "Value returned is $13 = 255\n" #. type: cindex #, no-wrap msgid "exit code, displayed in @code{gdb}" msgstr "c@'odigo exit, mostrado en @code{gdb}" #. type: Plain text msgid "" "To continue execution until the program exits (or hits the next breakpoint) " "use the command @code{continue}," msgstr "" "Para continuar la ejecuci@'on hasta que el programa termine (o hasta el\n" "siguiente breakpoint) use el comando @code{continue}," #. type: example #, no-wrap msgid "" "(gdb) continue\n" "Continuing.\n" "Program exited with code 0377.\n" msgstr "" "(gdb) continue\n" "Continuing.\n" "Program exited with code 0377.\n" #. type: Plain text msgid "" "Note that the exit code is shown in octal (0377 base 8 = 255 in base 10)." msgstr "" "Observe que el c@'odigo de salida se muestra en notaci@'on octal\n" "(0377 base 8 = 255 en base 10)." #. type: section #, no-wrap msgid "More information" msgstr "M@'as informaci@'on" #. type: cindex #, no-wrap msgid "Emacs, @code{gdb} mode" msgstr "Emacs, modo @code{gdb}" #. type: cindex #, no-wrap msgid "@code{gdb}, Emacs mode" msgstr "@code{gdb}, modo Emacs" #. type: cindex #, no-wrap msgid "@code{gdb}, graphical interface" msgstr "@code{gdb}, interfaz gr@'afica" #. type: cindex #, no-wrap msgid "Insight, graphical interface for @code{gdb}" msgstr "Insight, Interfaz gr@'afica para @code{gdb}" #. type: Plain text msgid "" "For simplicity, the examples in this chapter demonstrate how to use @code" "{gdb} on the command-line. There are more powerful ways to debug a program " "interactively using tools such as Emacs @sc{gdb} mode (@kbd{M-x gdb}), @sc" "{ddd} or @sc{insight}, graphical interfaces to @code{gdb}. Links to these " "programs can be found on the publisher's webpage for this book.@footnote" "{@uref{http://www.network-theory.co.uk/gcc/intro/}}" msgstr "" "Por simplicidad, los ejemplos de este cap@'{@dotless{i}}tulo\n" "demuestran como usar @code{gdb} en la l@'{@dotless{i}}nea de\n" "comandos. Existen poderosas herramientas como Emacs en modo @sc{gdb}\n" "(@kbd{M-x gdb}), @sc{ddd} o @sc{insight}, interfaces gr@'aficos de\n" "@code{gdb}. Los enlaces a estos programas se puede encontrar en la\n" "p@'agina web del editor de este\n" "libro.@footnote{@uref{http://www.network-theory.co.uk/gcc/intro/}}" #. type: Plain text msgid "" "A complete description of all the commands available in @code{gdb} can be " "found in the manual ``@cite{Debugging with GDB: The GNU Source-Level " "Debugger}'' (@pxref{Further reading})." msgstr "" "Una completa descripci@'on de todos los comandos disponibles en\n" "@code{gdb} se puede encontrar en el manual ``@cite{Debugging with GDB:\n" "The GNU Soure-Level Debugger}'' (@pxref{Lectura adicional})." #. type: cindex #, no-wrap msgid "optimization, explanation of" msgstr "optimizaci@'on, explicaci@'on de" #. type: cindex #, no-wrap msgid "compiling with optimization" msgstr "compilando con optimizaci@'on" #. type: Plain text msgid "" "GCC is an @dfn{optimizing} compiler. It provides a wide range of options " "which aim to increase the speed, or reduce the size, of the executable files " "it generates." msgstr "" "GCC es un @dfn{compilador de optimizaci@'on}. Suministra un @'amplio rango " "de\n" "opciones que ayudan a incrementar la velocidad, o reducir el tama@~no,\n" "de los archivos ejecutables generados." #. type: Plain text msgid "" "Optimization is a complex process. For each high-level command in the " "source code there are usually many possible combinations of machine " "instructions that can be used to achieve the appropriate final result. The " "compiler must consider these possibilities and choose among them." msgstr "" "La optimizaci@'on es un proceso complejo. Para cada comando de alto\n" "nivel en el c@'odigo fuente normalmente hay muchas combinaciones\n" "posibles de instrucciones m@'aquina que pueden ser usadas para\n" "alcanzar los resultados finales apropiados. El compilador debe\n" "considerar todas estas posibilidades y elegir entre ellas." #. type: Plain text msgid "" "In general, different code must be generated for different processors, as " "they use incompatible assembly and machine languages. Each type of " "processor also has its own characteristics---some CPUs provide a large " "number of @dfn{registers} for holding intermediate results of calculations, " "while others must store and fetch intermediate results from memory. " "Appropriate code must be generated in each case." msgstr "" "En general, diferente c@'odigo es generado para diferentes\n" "procesadores, ya que usan ensambladores y lenguajes m@'aquina\n" "incompatibles. Cada tipo de procesador tiene sus propias\n" "caracter@'{@dotless{i}}sticas ---Algunas CPUs proporcionan un gran\n" "n@'umero de @dfn{registros} para manejar los resultados intermedios de\n" "c@'alculos, mientras que otros muchos deben almacenar y recuperar los\n" "resultados intermedios de la memoria. El c@'odigo apropiado debe\n" "generarse en cada caso." #. type: Plain text msgid "" "Furthermore, different amounts of time are needed for different " "instructions, depending on how they are ordered. GCC takes all these " "factors into account and tries to produce the fastest executable for a given " "system when compiling with optimization." msgstr "" "Adem@'as, diferentes instrucciones necesitan diferentes cantidades de\n" "tiempo, dependiendo de como fueron ordenadas. GCC, cuando compila\n" "con optimizaci@'on, toma estos factores en cuenta e intenta producir\n" "el ejecutable m@'as r@'apido para un sistema determinado." #. type: section #, no-wrap msgid "Source-level optimization" msgstr "Optimizaci@'on a nivel de fuentes" #. type: section #, no-wrap msgid "Speed-space tradeoffs" msgstr "Dilema velocidad-espacio" #. type: section #, no-wrap msgid "Scheduling" msgstr "Planificaci@'on" #. type: section #, no-wrap msgid "Optimization levels" msgstr "Niveles de optimizaci@'on" #. type: node #, no-wrap msgid "Optimization examples" msgstr "Ejemplos de optimizaci@'on" #. type: section #, no-wrap msgid "Optimization and debugging" msgstr "Optimizaci@'on y depuraci@'on" #. type: section #, no-wrap msgid "Optimization and compiler warnings" msgstr "Optimizaci@'on y avisos del compilador" #. type: cindex #, no-wrap msgid "source-level optimization" msgstr "optimizaci@'on a nivel de c@'odigo" #. type: Plain text msgid "" "The first form of optimization used by GCC occurs at the source-code level, " "and does not require any knowledge of the machine instructions. There are " "many source-level optimization techniques---this section describes two " "common types: @dfn{common subexpression elimination} and @dfn{function " "inlining}." msgstr "" "La primera forma de optimizaci@'on usada por GCC sucede a nivel de\n" "c@'odigo fuente, y no requiere ning@'un conocimiento de las\n" "instrucciones m@'aquina. Hay muchas t@'ecnicas de optimizaci@'on a\n" "nivel de c@'odigo fuente ---esta secci@'on describe dos formas\n" "comunes: @dfn{eliminaci@'on de subexpresi@'on com@'un} y\n" "@dfn{expansi@'on de funci@'on en l@'{@dotless{i}}nea}." #. type: subsection #, no-wrap msgid "Common subexpression elimination" msgstr "Eliminaci@'on de subexpresi@'on com@'un" #. type: cindex #, no-wrap msgid "common subexpression elimination, optimization" msgstr "eliminaci@'on de subexpresi@'on com@'un, optimizaci@'on" #. type: cindex #, no-wrap msgid "optimization, common subexpression elimination" msgstr "optimizaci@'on, eliminaci@'on de subexpresi@'on com@'un" #. type: cindex #, no-wrap msgid "subexpression elimination, optimization" msgstr "eliminaci@'on de subexpresi@'on, optimizaci@'on" #. type: cindex #, no-wrap msgid "elimination, of common subexpressions" msgstr "eliminaci@'on, de subexpresiones comunes" #. type: Plain text msgid "" "One method of source-level optimization which is easy to understand involves " "computing an expression in the source code with fewer instructions, by " "reusing already-computed results. For example, the following assignment:" msgstr "" "Un m@'etodo de optimizaci@'on a nivel de c@'odigo fuente f@'acil de\n" "comprender implica el tratamiento de expresiones en el c@'odigo fuente\n" "con menor n@'umero de instrucciones, reutilizando resultados ya\n" "calculados. Por ejemplo, la siguiente asignaci@'on:" #. type: example #, no-wrap msgid "x = cos(v)*(1+sin(u/2)) + sin(w)*(1-sin(u/2))\n" msgstr "x = cos(v)*(1+sin(u/2)) + sin(w)*(1-sin(u/2))\n" #. type: Plain text msgid "" "can be rewritten with a temporary variable @code{t} to eliminate an " "unnecessary extra evaluation of the term @code{sin(u/2)}:" msgstr "" "puede ser reescrita con una variable temporal @code{t} y\n" "as@'{@dotless{i}} eliminar evaluaciones extras innecesarias del\n" "t@'ermino @code{sin(u/2)}:" #. type: example #, no-wrap msgid "" "t = sin(u/2)\n" "x = cos(v)*(1+t) + sin(w)*(1-t)\n" msgstr "" "t = sin(u/2)\n" "x = cos(v)*(1+t) + sin(w)*(1-t)\n" #. type: Plain text msgid "" "This rewriting is called @dfn{common subexpression elimination} (CSE), and " "is performed automatically when optimization is turned on.@footnote" "{Temporary values introduced by the compiler during common subexpression " "elimination are only used internally, and do not affect real variables. The " "name of the temporary variable @samp{t} shown above is only used as an " "illustration.} Common subexpression elimination is powerful, because it " "simultaneously increases the speed and reduces the size of the code." msgstr "" "Esta reescritura es denominada @dfn{eliminaci@'on de subexpresiones\n" "comunes} (CSE)@footnote{Nota del traductor: Siglas en ingl@'es de\n" "`Common Subexpression Elimination'}, y se realiza de forma\n" "autom@'atica cuando la optimizaci@'on est@'a activa.@footnote{Los\n" "valores introducidos temporalmente por el compilador durante la\n" "eliminaci@'on de subexpresiones comunes son usados s@'olo\n" "internamente, y no afectan a las variables reales. El nombre de la\n" "variable temporal @code{t} mostrado anteriormente s@'olo es a modo\n" "ilustrativo} La eliminaci@'on de subexpresiones comunes es beneficiosa\n" "porque simult@'aneamente incrementa la velocidad y reduce el tama@~no\n" "del c@'odigo." #. type: subsection #, no-wrap msgid "Function inlining" msgstr "Expansi@'on de funci@'on en l@'{@dotless{i}}nea" #. type: cindex #, no-wrap msgid "function inlining, example of optimization" msgstr "expansi@'on de funci@'on en l@'{@dotless{i}}nea, ejemplo de optimizaci@'on" #. type: cindex #, no-wrap msgid "inlining, example of optimization" msgstr "expansi@'on en l@'{@dotless{i}}nea, ejemplo de optimizaci@'on" #. type: Plain text msgid "" "Another type of source-level optimization, called @dfn{function inlining}, " "increases the efficiency of frequently-called functions." msgstr "" "Otro tipo de optimizaci@'on a nivel de c@'odigo fuente, denominada\n" "@dfn{expansi@'on de funci@'on en l@'{@dotless{i}}nea}, incrementa la\n" "eficiencia de la llamadas a funciones frecuentes." #. type: Plain text msgid "" "Whenever a function is used, a certain amount of extra time is required for " "the CPU to carry out the call: it must store the function arguments in the " "appropriate registers and memory locations, jump to the start of the " "function (bringing the appropriate virtual memory pages into physical memory " "or the CPU cache if necessary), begin executing the code, and then return to " "the original point of execution when the function call is complete. This " "additional work is referred to as @dfn{function-call overhead}. Function " "inlining eliminates this overhead by replacing calls to a function by the " "code of the function itself (known as placing the code @dfn{in-line})." msgstr "" "Cuando una funci@'on se invoca, se requiere una cierta cantidad de\n" "tiempo extra de CPU para llevar a cabo la llamada: se almacenan los\n" "argumentos de la funci@'on en los apropiados registros y\n" "localizaciones de memoria, se salta al inicio de la funci@'on (trayendo las\n" "adecuadas p@'aginas de memoria virtual en memoria f@'{@dotless{i}}sica\n" "@'o en la cach@'e de la CPU si fuera necesario), comienza la ejecuci@'on\n" "del c@'odigo, y se vuelve al punto original de ejecuci@'on donde la\n" "llamada a la funci@'on se completa. Este trabajo adicional es llamado\n" "@dfn{sobrecarga de la llamada a funci@'on}. La @dfn{expansi@'on de\n" "funci@'on en l@'{@dotless{i}}nea} elimina esta sobrecarga sustituyendo\n" "llamadas a funciones por el c@'odigo mismo de la funci@'on (conocido\n" "como poner el c@'odigo @dfn{en-l@'{@dotless{i}}nea})." #. type: cindex #, no-wrap msgid "function-call overhead" msgstr "sobrecarga de las llamadas a funciones" #. type: cindex #, no-wrap msgid "overhead, from function call" msgstr "sobrecarga, desde llamada a funci@'on" #. type: Plain text msgid "" "In most cases, function-call overhead is a negligible fraction of the total " "run-time of a program. It can become significant only when there are " "functions which contain relatively few instructions, and these functions " "account for a substantial fraction of the run-time---in this case the " "overhead then becomes a large proportion of the total run-time." msgstr "" "En la mayor@'{@dotless{i}}a de los casos, la sobrecarga de las\n" "llamadas a funciones es una fracci@'on insignificante del total de\n" "tiempo de ejecuci@'on de un programa. Puede ser significativo s@'olo\n" "cuando las funciones contienen relativamente pocas instrucciones y\n" "emplean una fracci@'on sustancial de tiempo de ejecuci@'on ---en este\n" "caso la sobrecarga llega a ser una mayor proporci@'on del tiempo de\n" "ejecuci@'on." #. type: Plain text msgid "" "Inlining is always favorable if there is only one point of invocation of a " "function. It is also unconditionally better if the invocation of a function " "requires more instructions (memory) than moving the body of the function in-" "line. This is a common situation for simple accessor functions in C++, " "which can benefit greatly from inlining. Moreover, inlining may facilitate " "further optimizations, such as common subexpression elimination, by merging " "several separate functions into a single large function." msgstr "" "La expansi@'on de funciones en l@'{@dotless{i}}nea son siempre\n" "favorables si hay un @'unico punto de invocaci@'on a la\n" "funci@'on. Esto es incondicionalmente mejor si la invocaci@'on a una\n" "funci@'on requiere m@'as instrucciones (memoria) que mover el cuerpo\n" "de la funci@'on en linea. Esto es una situaci@'on habitual para una\n" "simple funci@'on de acceso en C++, lo cual puede beneficiar mucho a\n" "las funciones en l@'{@dotless{i}}nea. Por otra parte, las funciones en\n" "l@'{@dotless{i}}nea pueden facilitar optimizaciones futuras, como la\n" "eliminaci@'on de subexpresiones comunes, mezclando varias funciones\n" "separadas en un sencilla funci@'on m@'as grande." #. type: Plain text msgid "" "The following function @code{sq(x)} is a typical example of a function that " "would benefit from being inlined. It computes @math{x^2}, the square of its " "argument @math{x}:" msgstr "" "La siguiente funci@'on @code{sq(x)} es un t@'{@dotless{i}}pico ejemplo\n" "de una funci@'on que se beneficiar@'{@dotless{i}}a de la expansi@'on\n" "de funci@'on en l@'{@dotless{i}}nea. Calcula @math{x^2}, el cuadrado\n" "del argumento @math{x}:" #. type: example #, no-wrap msgid "" "double\n" "sq (double x)\n" "@{\n" " return x * x;\n" "@}\n" msgstr "" "double\n" "sq (double x)\n" "@{\n" " return x * x;\n" "@}\n" #. type: Plain text msgid "" "This function is small, so the overhead of calling it is comparable to the " "time taken to execute the single multiplication carried out by the function " "itself. If this function is used inside a loop, such as the one below, then " "the function-call overhead would become substantial:" msgstr "" "Esta funci@'on es peque@~na, as@'{@dotless{i}} la sobrecarga de la\n" "llamada es comparable al tiempo tomado en ejecutar una simple\n" "multiplicaci@'on fuera de la funci@'on misma. Si esta funci@'on se\n" "invoca dentro de un bucle, tal y como sucede m@'as abajo, entonces la\n" "sobrecarga de la llamada a la funci@'on llegar@'{@dotless{i}}a a ser\n" "sustancial:" #. type: example #, no-wrap msgid "" "for (i = 0; i < 1000000; i++)\n" " @{\n" " sum += sq (i + 0.5);\n" " @}\n" msgstr "" "for (i = 0; i < 1000000; i++)\n" " @{\n" " sum += sq (i + 0.5);\n" " @}\n" #. type: Plain text msgid "" "Optimization with inlining replaces the inner loop of the program with the " "body of the function, giving the following code:" msgstr "" "La optimizaci@'on con expansi@'on de funci@'on en l@'{@dotless{i}}nea\n" "reemplaza el interior del bucle del programa con el cuerpo de la\n" "funci@'on, dando el siguiente c@'odigo:" #. type: example #, no-wrap msgid "" "for (i = 0; i < 1000000; i++)\n" " @{\n" " double t = (i + 0.5); /* temporary variable */\n" " sum += t * t;\n" " @}\n" msgstr "" "for (i = 0; i < 1000000; i++)\n" " @{\n" " double t = (i + 0.5); /* variable temporal */\n" " sum += t * t;\n" " @}\n" #. type: Plain text msgid "" "Eliminating the function call and performing the multiplication @dfn{in-" "line} allows the loop to run with maximum efficiency." msgstr "" "La eliminaci@'on de la llamada a la funci@'on y realizar la\n" "multiplicaci@'on @dfn{en l@'{@dotless{i}}nea} permite al bucle\n" "ejecutarse con m@'axima eficiencia." #. type: Plain text msgid "" "GCC selects functions for inlining using a number of heuristics, such as the " "function being suitably small. As an optimization, inlining is carried out " "only within each object file. The @code{inline} keyword can be used to " "request explicitly that a specific function should be inlined wherever " "possible, including its use in other files.@footnote{In this case, the " "definition of the inline function must be made available to the other files " "(e.g. in a header file).} The GCC Reference Manual ``@cite{Using GCC}'' " "provides full details of the @code{inline} keyword, and its use with the " "@code{static} and @code{extern} qualifiers to control the linkage of " "explicitly inlined functions (@pxref{Further reading})." msgstr "" "GCC selecciona funciones para poner expandir en l@'{@dotless{i}}nea\n" "usando un n@'umero de heur@'{@dotless{i}}sticas, tal como funciones\n" "que son adecuadamente peque@~nas. Como optimizaci@'on, las funciones\n" "en l@'{@dotless{i}}nea son llevadas a cabo s@'olo dentro del archivo\n" "objeto. La palabra reservada @code{inline} pueder ser usada para\n" "requerir expl@'{@dotless{i}}citamente que una funci@'on\n" "espec@'{@dotless{i}}fica deba ser tratada en l@'{@dotless{i}}nea como\n" "sea posible, incluyendo sus usos en otros archivos.@footnote{En este\n" "caso, la definici@'on de la funci@'on en l@'{@dotless{i}}nea debe ser\n" "hecha en otro archivo (p.e. en un archivo de cabeceras).} El Manual de\n" "Referencia de GCC ''@cite{Using GCC}'' suministra un completo detalle\n" "de la palabra reservada @code{inline}, y emplea los calificadores\n" "@code{static} y @code{extern} para controlar el enlazado de las\n" "funciones en l@'{@dotless{i}}nea expl@'{@dotless{i}}citamente\n" "(@pxref{Lectura adicional})." #. type: cindex #, no-wrap msgid "speed-space tradeoffs, in optimization" msgstr "dilema velocidad-espacio, en optimizaci@'on" #. type: cindex #, no-wrap msgid "optimization, speed-space tradeoffs" msgstr "optimizaci@'on, dilema velocidad-espacio" #. type: cindex #, no-wrap msgid "tradeoffs, between speed and space in optimization" msgstr "dilema, entre velocidad y espacio en optimizaci@'on" #. type: cindex #, no-wrap msgid "space vs speed, tradeoff in optimization" msgstr "espacio versus velocidad, dilema en optimizaci@'on" #. type: Plain text msgid "" "While some forms of optimization, such as common subexpression elimination, " "are able to increase the speed and reduce the size of a program " "simultaneously, other types of optimization produce faster code at the " "expense of increasing the size of the executable. This choice between speed " "and memory is referred to as a @dfn{speed-space tradeoff}. Optimizations " "with a speed-space tradeoff can also be used in reverse to make an " "executable smaller, at the expense of making it run slower." msgstr "" "Mientras que algunas formas de optimizaci@'on, tales como la\n" "eliminaci@'on de subexpresiones comunes, son capaces simult@'aneamente\n" "de incrementar la velocidad y reducir el tama@~no de un programa,\n" "otros tipos de optimizaci@'on producen c@'odigo m@'as r@'apido a costa\n" "de incrementar el tama@~no del ejecutable. Esta elecci@'on entre\n" "velocidad y espacio se denomina @dfn{dilema velocidad-espacio}. Las\n" "optimizaciones con el @dfn{dilema velocidad-espacio} se pueden usar en\n" "sentido inverso para hacer ejecutables peque@~nos, a cambio de\n" "hacerlos correr m@'as lentos." #. type: subsection #, no-wrap msgid "Loop unrolling" msgstr "Desenrollado de bucle" #. type: cindex #, no-wrap msgid "loop unrolling, optimization" msgstr "Desenrollado de bucle, optimizaci@'on" #. type: cindex #, no-wrap msgid "optimization, loop unrolling" msgstr "optimizaci@'on, desenrollado de bucle" #. type: cindex #, no-wrap msgid "unrolling, of loops (optimization)" msgstr "desenrollado, bucles (optimizaci@'on)" #. type: Plain text msgid "" "A prime example of an optimization with a speed-space tradeoff is @dfn{loop " "unrolling}. This form of optimization increases the speed of loops by " "eliminating the ``end of loop'' condition on each iteration. For example, " "the following loop from 0 to 7 tests the condition @code{i < 8} on each " "iteration:" msgstr "" "Un primer ejemplo de optimizaci@'on con el @dfn{dilema velocidad-espacio}\n" "es @dfn{Desenrollado de bucle}. Esta forma de optimizaci@'on\n" "incrementa la velocidad de los bucles eliminando la condici@'on de\n" "terminaci@'on del bucle en cada iteraci@'on. Por ejemplo, el siguiente\n" "bucle de 0 a 7 comprueba la condici@'on @code{i < 8} en cada\n" "iteraci@'on:" #. type: example #, no-wrap msgid "" "for (i = 0; i < 8; i++)\n" " @{\n" " y[i] = i;\n" " @}\n" msgstr "" "for (i = 0; i < 8; i++)\n" " @{\n" " y[i] = i;\n" " @}\n" #. type: Plain text msgid "" "At the end of the loop, this test will have been performed 9 times, and a " "large fraction of the run time will have been spent checking it." msgstr "" "Al final del bucle, esta condici@'on ha sido comprobada 9 veces, y\n" "gran parte del tiempo de ejecuci@'on fu@'e gastado en la comprobaci@'on." #. type: Plain text msgid "" "A more efficient way to write the same code is simply to @dfn{unroll the " "loop} and execute the assignments directly:" msgstr "" "Una forma m@'as eficiente de escribir el mismo c@'odigo es simplemente\n" "@dfn{desenrollar el bucle} y ejecuta las instrucciones directamente:" #. type: example #, no-wrap msgid "" "y[0] = 0;\n" "y[1] = 1;\n" "y[2] = 2;\n" "y[3] = 3;\n" "y[4] = 4;\n" "y[5] = 5;\n" "y[6] = 6;\n" "y[7] = 7;\n" msgstr "" "y[0] = 0;\n" "y[1] = 1;\n" "y[2] = 2;\n" "y[3] = 3;\n" "y[4] = 4;\n" "y[5] = 5;\n" "y[6] = 6;\n" "y[7] = 7;\n" #. type: Plain text msgid "" "This form of the code does not require any tests, and executes at maximum " "speed. Since each assignment is independent, it also allows the compiler to " "use parallelism on processors that support it. Loop unrolling is an " "optimization that increases the speed of the resulting executable but also " "generally increases its size (unless the loop is very short, with only one " "or two iterations, for example)." msgstr "" "Este tipo de c@'odigo no requiere ning@'un test, y se ejecuta a la\n" "m@'axima velocidad. Una vez que cada asignaci@'on es independiente,\n" "permite ser compilado para usar procesamiento paralelo cuando es\n" "soportado. Desenrollado de bucle es una optimizaci@'on que incrementa\n" "la velocidad del ejecutable resultante pero generalmente incrementa su\n" "tama@~no (a menos que el bucle sea muy corto, con s@'olo una o dos\n" "iteraciones, por ejemplo)." #. type: Plain text msgid "" "Loop unrolling is also possible when the upper bound of the loop is unknown, " "provided the start and end conditions are handled correctly. For example, " "the same loop with an arbitrary upper bound," msgstr "" "Desenrollado de bucle se hace posible cuando el l@'{@dotless{i}}mite\n" "superior de un bucle es desconocido, siempre y cuando las condiciones\n" "de inicio y terminaci@'on sean manejadas correctamente. Por ejemplo,\n" "el mismo bucle con un l@'{@dotless{i}}mite superior arbitrario," #. type: example #, no-wrap msgid "" "for (i = 0; i < n; i++)\n" " @{\n" " y[i] = i;\n" " @}\n" msgstr "" "for (i = 0; i < n; i++)\n" " @{\n" " y[i] = i;\n" " @}\n" #. type: Plain text msgid "can be rewritten by the compiler as follows:" msgstr "puede ser reescrito por el compilador como sigue:" #. type: example #, no-wrap msgid "" "for (i = 0; i < (n % 2); i++)\n" " @{\n" " y[i] = i;\n" " @}\n" "\n" msgstr "" "for (i = 0; i < (n % 2); i++)\n" " @{\n" " y[i] = i;\n" " @}\n" "\n" #. type: example #, no-wrap msgid "" "for ( ; i + 1 < n; i += 2) /* no initializer */\n" " @{\n" " y[i] = i;\n" " y[i+1] = i+1; \n" " @}\n" msgstr "" "for ( ; i + 1 < n; i += 2) /* sin inicializador */\n" " @{\n" " y[i] = i;\n" " y[i+1] = i+1; \n" " @}\n" #. type: Plain text msgid "" "The first loop handles the case @code{i = 0} when @code{n} is odd, and the " "second loop handles all the remaining iterations. Note that the second loop " "does not use an initializer in the first argument of the @code{for} " "statement, since it continues where the first loop finishes. The assignments " "in the second loop can be parallelized, and the overall number of tests is " "reduced by a factor of 2 (approximately). Higher factors can be achieved by " "unrolling more assignments inside the loop, at the cost of greater code size." msgstr "" "El primer bucle trata el caso @code{i = 0} cuando @code{n} es impar,\n" "y el segundo bucle trata el resto de iteraciones. Observe que el\n" "segundo bucle no usa un inicializador en el primer argumento de la\n" "instrucci@'on @code{for}, justo contin@'ua donde el primer bucle\n" "termin@'o. Las instrucciones del segundo bucle pueden ser\n" "paralelizadas, y el total del n@'umero de tests se reduce en un factor\n" "de 2 (aproximadamente). Factores mayores se pueden alcanzar\n" "desenrollando m@'as instrucciones dentro del bucle, a cambio de\n" "agrandar el tama@~no del c@'odigo." #. type: cindex #, no-wrap msgid "scheduling, stage of optimization" msgstr "planificaci@'on, fase de optimizaci@'on" #. type: cindex #, no-wrap msgid "instruction scheduling, optimization" msgstr "planificaci@'on de instrucci@'on, optimizaci@'on" #. type: cindex #, no-wrap msgid "pipelining, explanation of" msgstr "segmentaci@'on, explicaci@'on de" #. type: Plain text msgid "" "The lowest level of optimization is @dfn{scheduling}, in which the compiler " "determines the best ordering of individual instructions. Most CPUs allow " "one or more new instructions to start executing before others have " "finished. Many CPUs also support @dfn{pipelining}, where multiple " "instructions execute in parallel on the same CPU." msgstr "" "El menor nivel de optimizaci@'on es la @dfn{planificaci@'on}, en el\n" "cual el compilador determina el mejor orden para las instrucciones\n" "individuales. La mayor@'{@dotless{i}}a de las CPUs permiten que una o\n" "m@'as nuevas instrucciones comiencen a ejecutarse antes de que otras\n" "hallan terminado. Muchas CPUs tienen soporte para\n" "@dfn{segmentaci@'on}, donde m@'ultiples instrucciones se ejecutan en\n" "paralelo en la misma CPU." #. type: Plain text msgid "" "When scheduling is enabled, instructions must be arranged so that their " "results become available to later instructions at the right time, and to " "allow for maximum parallel execution. Scheduling improves the speed of an " "executable without increasing its size, but requires additional memory and " "time in the compilation process itself (due to its complexity)." msgstr "" "Cuando la planificaci@'on est@'a habilitada, las instrucciones pueden\n" "disponer de sus resultados llegando a tener disponible la siguiente\n" "instrucci@'on en el tiempo correcto, y a permitir un m@'aximo de\n" "ejecuci@'on en paralelo. La @dfn{planificaci@'on} aumenta la velocidad\n" "de un ejecutable sin incrementar su tama@~no, pero requiere memoria y\n" "tiempo adicional en sus procesos de compilaci@'on (dada su\n" "complejidad)." #. type: cindex #, no-wrap msgid "optimization, compiling with @option{-O}" msgstr "optimizaci@'on, compilando con @option{-O}" #. type: cindex #, no-wrap msgid "optimization, levels of" msgstr "optimizaci@'on, niveles de" #. type: cindex #, no-wrap msgid "levels of optimization" msgstr "niveles de optimizaci@'on" #. type: cindex #, no-wrap msgid "@option{O} option, optimization level" msgstr "@option{O}, opci@'on para establecer el nivel de optimizaci@'on" #. type: Plain text msgid "" "In order to control compilation-time and compiler memory usage, and the " "trade-offs between speed and space for the resulting executable, GCC " "provides a range of general optimization levels, numbered from 0--3, as well " "as individual options for specific types of optimization." msgstr "" "Para controlar los tiempos de compilaci@'on y el uso de memoria, y la\n" "compensaci@'on entre velocidad y espacio para el ejecutable\n" "resultante, GCC suministra un rango de niveles generales de\n" "optimizaci@'on, numerados desde 0 al 3, as@'{@dotless{i}} como\n" "opciones individuales para tipos espec@'{@dotless{i}}ficos de\n" "optimizaci@'on." #. type: Plain text msgid "" "An optimization level is chosen with the command line option @option{-O@var" "{LEVEL}}, where @code{@var{LEVEL}} is a number from 0 to 3. The effects of " "the different optimization levels are described below:" msgstr "" "El nivel de optimizaci@'on se elige con la opci@'on\n" "@option{-O@var{NIVEL}}, donde @code{@var{NIVEL}} es un n@'umero del 0\n" "al 3. Los efectos de los diferentes niveles de optimizaci@'on se\n" "describen a continuaci@'on:" #. type: item #, no-wrap msgid "@option{-O0} or @r{no @option{-O} option} (default)" msgstr "@option{-O0} o @r{sin opci@'on @option{-O}} (por defecto)" #. type: cindex #, no-wrap msgid "@option{-O0} option, optimization level zero" msgstr "@option{-O0}, opci@'on para establece nivel de optimizaci@'on cero" #. type: cindex #, no-wrap msgid "unoptimized code (@option{-O0})" msgstr "c@'odigo no optimizado (@option{-O0})" #. type: table msgid "" "At this optimization level GCC does not perform any optimization and " "compiles the source code in the most straightforward way possible. Each " "command in the source code is converted directly to the corresponding " "instructions in the executable file, without rearrangement. This is the " "best option to use when debugging a program and is the default if no " "optimization level option is specified." msgstr "" "Este nivel de optimizaci@'on no realiza ninguna optimizaci@'on y\n" "compila el c@'odigo fuente de la forma m@'as sencilla posible. Cada\n" "comando en el c@'odigo fuente es convertido directamente a sus\n" "correspondientes instrucciones en el archivo ejecutable, sin\n" "reorganizaci@'on. Esta es la mejor opci@'on a usar cuando se depura un\n" "programa y es la opci@'on por defecto si no se especifica una opci@'on\n" "de nivel de optimizaci@'on." #. type: item #, no-wrap msgid "@option{-O1} @r{or} @option{-O}" msgstr "@option{-O1} @r{o} @option{-O}" #. type: cindex #, no-wrap msgid "@option{-O1} option, optimization level one" msgstr "@option{-O1}, opci@'on para establecer el nivel de optimizaci@'on uno" #. type: table msgid "" "This level turns on the most common forms of optimization that do not " "require any speed-space tradeoffs. With this option the resulting " "executables should be smaller and faster than with @option{-O0}. The more " "expensive optimizations, such as instruction scheduling, are not used at " "this level." msgstr "" "Este nivel activado es la optimizaci@'on m@'as frecuente ya que no\n" "requiere compensar entre velocidad y espacio. Con esta opci@'on los\n" "ejecutables resultantes deber@'{@dotless{i}}an ser m@'as peque@~nos y\n" "r@'apidos que con la opci@'on @option{-O0}. La optimizaci@'on m@'as\n" "costosa, como la planificaci@'on de instrucciones, no es usada a este\n" "nivel." #. type: table msgid "" "Compiling with the option @option{-O1} can often take less time than " "compiling with @option{-O0}, due to the reduced amounts of data that need to " "be processed after simple optimizations." msgstr "" "Compilar con la opci@'on @option{-O1} puede a menudo tomar menos\n" "tiempo que la compilaci@'on con la opci@'on @option{-O0}, debido a la\n" "reducida cantidad de datos que necesitan ser procesados despu@'es de\n" "una simple optimizaci@'on." #. type: option{#1} #, no-wrap msgid "-O2" msgstr "-O2" #. type: cindex #, no-wrap msgid "@option{-O2} option, optimization level two" msgstr "@option{-O2}, opci@'on para establecer el nivel de optimizaci@'on dos" #. type: table msgid "" "This option turns on further optimizations, in addition to those used by " "@option{-O1}. These additional optimizations include instruction " "scheduling. Only optimizations that do not require any speed-space " "tradeoffs are used, so the executable should not increase in size. The " "compiler will take longer to compile programs and require more memory than " "with @option{-O1}. This option is generally the best choice for deployment " "of a program, because it provides maximum optimization without increasing " "the executable size. It is the default optimization level for releases of " "GNU packages." msgstr "" "Esta opci@'on activa m@'as optimizaciones, adem@'as de las empleadas\n" "por @option{-O1}. Estas optimizaciones adicionales incluyen la\n" "planificaci@'on de instrucciones. S@'olo se emplear@'an optimizaciones\n" "que no requieren compensanci@'on entre velocidad y espacio,\n" "as@'{@dotless{i}} el ejecutable no aumentar@'a de tama@~no. Al\n" "compilador le costar@'a m@'as compilar programas y necesitar@'a m@'as\n" "memoria que con la opci@'on @option{-O1}. Esta opci@'on es la m@'as\n" "elegida en el desarrollo de programas, porque suministra un m@'aximo\n" "de optimizaci@'on sin incrementar el tama@~no del ejecutable. Es la\n" "opci@'on del nivel de optimizaci@'on por defecto en las versiones de\n" "paquetes GNU." #. type: option{#1} #, no-wrap msgid "-O3" msgstr "-O3" #. type: cindex #, no-wrap msgid "@option{-O3} option, optimization level three" msgstr "@option{-O3}, opci@'on para establecer el nivel de optimizaci@'on tres" #. type: table msgid "" "This option turns on more expensive optimizations, such as function " "inlining, in addition to all the optimizations of the lower levels @option{-" "O2} and @option{-O1}. The @option{-O3} optimization level may increase the " "speed of the resulting executable, but can also increase its size. Under " "some circumstances where these optimizations are not favorable, this option " "might actually make a program slower." msgstr "" "Esta opci@'on activa las m@'as costosas optimizaciones, tales como\n" "funciones en-l@'{@dotless{i}}nea, adem@'as de todas las optimizaciones\n" "de niveles inferiores @option{-O2} y @option{-O1}. El nivel de\n" "optimizaci@'on @option{-O3} incrementa la velocidad del\n" "ejecutable. Bajo algunas circunstancias donde esta optimizaci@'on no\n" "es posible, esta opci@'on podr@'{@dotless{i}}a hacer un programa muy\n" "lento." #. type: option{#1} #, no-wrap msgid "-funroll-loops" msgstr "-funroll-loops" #. type: cindex #, no-wrap msgid "@option{-funroll-loops} option, optimization by loop unrolling" msgstr "@option{-funroll-loops}, opci@'on para hacer optimizaci@'on por desenrollado de bucles" #. type: cindex #, no-wrap msgid "@option{funroll-loops} option, optimization by loop unrolling" msgstr "@option{funroll-loops}, opci@'on para hacer optimizaci@'on por desenrollado del bucles" #. type: table msgid "" "This option turns on loop-unrolling, and is independent of the other " "optimization options. It will increase the size of an executable. Whether " "or not this option produces a beneficial result has to be examined on a case-" "by-case basis." msgstr "" "Esta opci@'on activa el desenrollado de bucles, y es independiente de\n" "otras opciones de optimizaci@'on. Se incrementar@'a el tama@~no del\n" "ejecutable. Si esta opci@'on produce o no un resultado beneficioso\n" "ser@'a comprobado sobre una base caso por caso." #. type: option{#1} #, no-wrap msgid "-Os" msgstr "-Os" #. type: cindex #, no-wrap msgid "@option{-Os} option, optimization for size" msgstr "@option{-Os}, opci@'on para hacer optimizaci@'on por tama@~no" #. type: cindex #, no-wrap msgid "optimization for size, @option{-Os}" msgstr "optimizaci@'on por tama@~no, opci@'on @option{-Os}" #. type: cindex #, no-wrap msgid "size, optimization for, @option{-Os}" msgstr "tama@~no, optimizaci@'on por, @option{-Os}" #. type: table msgid "" "This option selects optimizations which reduce the size of an executable. " "The aim of this option is to produce the smallest possible executable, for " "systems constrained by memory or disk space. In some cases a smaller " "executable will also run faster, due to better cache usage." msgstr "" "Esta opci@'on selecciona las optimizaciones que reducen el tama@~no\n" "del ejecutable. El prop@'osito de esta opci@'on es producir el\n" "ejecutable menor posible, para sistemas con restricciones de memoria o\n" "espacio de disco. En algunos casos un peque@~no ejecutable es m@'as\n" "r@'apido, debido al mejor uso de memoria cach@'e." #. type: Plain text msgid "" "It is important to remember that the benefit of optimization at the highest " "levels must be weighed against the cost. The cost of optimization includes " "greater complexity in debugging, and increased time and memory requirements " "during compilation. For most purposes it is satisfactory to use @option{-" "O0} for debugging, and @option{-O2} for development and deployment." msgstr "" "Es importante recordar que el beneficio de altos niveles de\n" "optimizaci@'on debe sopesarse contra el coste. El coste de la\n" "optimizaci@'on incluye una gran complejidad en depuraci@'on, e\n" "incrementa los requerimientos de tiempo y memoria durante la\n" "compilaci@'on. Para la mayor@'{@dotless{i}}a de los prop@'ositos es\n" "conveniente usar la opci@'on @option{-O0} para depuraci@'on, y la\n" "opci@'on @option{-O2} para el desarrollo y uso posterior." #. type: section #, no-wrap msgid "Examples" msgstr "Ejemplos" #. type: cindex #, no-wrap msgid "optimization, example of" msgstr "optimizaci@'on, ejemplo de" #. type: Plain text msgid "" "The following program will be used to demonstrate the effects of different " "optimization levels:" msgstr "" "El siguiente programa ser@'a usado para demostrar los efectos de los\n" "diferentes niveles de optimizaci@'on:" #. type: example #, no-wrap msgid "@verbatiminclude optim.c\n" msgstr "@verbatiminclude optim.es.c\n" #. type: cindex #, no-wrap msgid "benchmarking, with @code{time} command" msgstr "benchmarking, con comando @code{time}" #. type: cindex #, no-wrap msgid "@code{time} command, measuring run-time" msgstr "comando @code{time}, midiendo tiempo de ejecuci@'on" #. type: cindex #, no-wrap msgid "run-time, measuring with @code{time} command" msgstr "tiempo de ejecuci@'on, midiendo con comando @code{time}" #. type: Plain text msgid "" "The main program contains a loop calling the @code{powern} function. This " "function computes the @i{n}-th power of a floating point number by repeated " "multiplication---it has been chosen because it is suitable for both inlining " "and loop-unrolling. The run-time of the program can be measured using the " "@code{time} command in the GNU Bash shell." msgstr "" "El programa principal contiene un bucle invocando a la funci@'on\n" "@code{powern}. Esta funci@'on calcula la en@'esima potencia de un\n" "n@'umero en coma flotante con repetici@'on de multiplicaciones ---esto\n" "ha sido elegido as@'{@dotless{i}} porque es conveniente para funciones\n" "en l@'{@dotless{i}}nea y desenrollado de bucles. El tiempo de\n" "ejecuci@'on de un programa puede ser medido usando el comando\n" "@code{time} en la GNU Bash shell." #. type: Plain text msgid "" "Here are some results for the program above, compiled on a 566@dmn{MHz} " "Intel Celeron with 16@dmn{KB} L1-cache and 128@dmn{KB} L2-cache, using GCC " "3.3.1 on a GNU/Linux system:" msgstr "" "Aqu@'{@dotless{i}} se muestran los resultados para el programa\n" "anterior, compilado en un 566@dmn{MHz} Intel Celeron con 16@dmn{KB}\n" "L1-cache y 128@dmn{KB} L2-cache, usando GCC 3.3.1 en un sistema GNU/Linux:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -O0 optim.c -lm\n" "$ time ./a.out \n" "real 0m13.388s\n" "user 0m13.370s\n" "sys 0m0.010s\n" "\n" msgstr "" "$ gcc -Wall -O0 optim.es.c -lm\n" "$ time ./a.out \n" "real 0m13.388s\n" "user 0m13.370s\n" "sys 0m0.010s\n" "\n" #. type: example #, no-wrap msgid "" "$ gcc -Wall -O1 optim.c -lm\n" "$ time ./a.out\n" "real 0m10.030s\n" "user 0m10.030s\n" "sys 0m0.000s\n" "\n" msgstr "" "$ gcc -Wall -O1 optim.es.c -lm\n" "$ time ./a.out\n" "real 0m10.030s\n" "user 0m10.030s\n" "sys 0m0.000s\n" "\n" #. type: example #, no-wrap msgid "" "$ gcc -Wall -O2 optim.c -lm\n" "$ time ./a.out\n" "real 0m8.388s\n" "user 0m8.380s\n" "sys 0m0.000s\n" "\n" msgstr "" "$ gcc -Wall -O2 optim.es.c -lm\n" "$ time ./a.out\n" "real 0m8.388s\n" "user 0m8.380s\n" "sys 0m0.000s\n" "\n" #. type: example #, no-wrap msgid "" "$ gcc -Wall -O3 optim.c -lm\n" "$ time ./a.out\n" "real 0m6.742s\n" "user 0m6.730s\n" "sys 0m0.000s\n" "\n" msgstr "" "$ gcc -Wall -O3 optim.es.c -lm\n" "$ time ./a.out\n" "real 0m6.742s\n" "user 0m6.730s\n" "sys 0m0.000s\n" "\n" #. type: example #, no-wrap msgid "" "$ gcc -Wall -O3 -funroll-loops optim.c -lm\n" "$ time ./a.out\n" "real 0m5.412s\n" "user 0m5.390s\n" "sys 0m0.000s\n" msgstr "" "$ gcc -Wall -O3 -funroll-loops optim.es.c -lm\n" "$ time ./a.out\n" "real 0m5.412s\n" "user 0m5.390s\n" "sys 0m0.000s\n" #. type: Plain text msgid "" "The relevant entry in the output for comparing the speed of the resulting " "executables is the @samp{user} time, which gives the actual CPU time spent " "running the process. The other rows, @samp{real} and @samp{sys}, record the " "total real time for the process to run (including times where other " "processes were using the CPU) and the time spent waiting for operating " "system calls. Although only one run is shown for each case above, the " "benchmarks were executed several times to confirm the results." msgstr "" "La entrada relevante en la salida para comparar la velocidad de los\n" "ejecutables resultantes es el tiempo @samp{user}, el cual da el\n" "tiempo de CPU empleado en la ejecuci@'on del proceso actual. En otras\n" "filas, @samp{real} y @samp{sys}, registran el tiempo total real de los\n" "procesos que se ejecutan (incluyendo los tiempos de otros procesos que\n" "est@'an usando la CPU) y el tiempo empleado en esperar las llamadas al\n" "sistema operativo. Aunque s@'olo se ha mostrado una ejecuci@'on, las\n" "pruebas de rendimiento ser@'an ejecutadas varias veces para confirmar\n" "los resultados." #. type: Plain text msgid "" "From the results it can be seen in this case that increasing the " "optimization level with @option{-O1}, @option{-O2} and @option{-O3} produces " "an increasing speedup, relative to the unoptimized code compiled with @option" "{-O0}. The additional option @option{-funroll-loops} produces a further " "speedup. The speed of the program is more than doubled overall, when going " "from unoptimized code to the highest level of optimization." msgstr "" "En los resultados puede apreciarse en este caso que incrementando el\n" "nivel de optimizaci@'on con @option{-O1}, @option{-O2} y @option{-O3}\n" "se produce un incremento de la velocidad. A@~nadiendo la opci@'on\n" "@option{-funroll-loops} se produce la mayor rapidez. La velocidad del\n" "programa aumenta al doble de la inicial, cuando va desde el c@'odigo\n" "no optimizado al m@'as alto nivel de optimizaci@'on." #. type: Plain text msgid "" "Note that for a small program such as this there can be considerable " "variation between systems and compiler versions. For example, on a Mobile " "2.0@dmn{GHz} Intel Pentium 4M system the trend of the results using the same " "version of GCC is similar except that the performance with @option{-O2} is " "slightly worse than with @option{-O1}. This illustrates an important point: " "optimizations may not necessarily make a program faster in every case." msgstr "" "Observe que un peque@~no programa como este puede tener considerables\n" "variaciones para versiones de sistemas y compiladores. Por ejemplo, en\n" "un sistema Mobile 2.0@dmn{GHz} Intel Pentium 4M la tendencia del\n" "resultado usando la misma versi@'on de GCC es similar excepto que el\n" "rendimiento con @option{-O2} es ligeramente peor que con\n" "@option{-O1}. Esto ilustra un importante punto: las optimizaciones no\n" "necesariamente hacen programas m@'as r@'apidos en todos los casos." #. type: cindex #, no-wrap msgid "debugging, with optimization" msgstr "depurando, con optimizaci@'on" #. type: cindex #, no-wrap msgid "optimization, with debugging" msgstr "optmizaci@'on, con depuraci@'on" #. type: Plain text msgid "" "With GCC it is possible to use optimization in combination with the " "debugging option @option{-g}. Many other compilers do not allow this." msgstr "" "Con GCC es posible usar optimizaci@'on en combinaci@'on con la\n" "opci@'on @option{-g} de depuraci@'on. Otros muchos compiladores no\n" "permiten esto." #. type: Plain text msgid "" "When using debugging and optimization together, the internal rearrangements " "carried out by the optimizer can make it difficult to see what is going on " "when examining an optimized program in the debugger. For example, temporary " "variables are often eliminated, and the ordering of statements may be " "changed." msgstr "" "Cuando se usa depuraci@'on y optimizaci@'on juntas, la\n" "reorganizaci@'on interna llevada a cabo por el optimizador puede hacer\n" "dif@'{@dotless{i}}cil ver que est@'a haciendo un programa cuando se\n" "examinan programas optimizados con el depurador. Por ejemplo, las\n" "variables temporales son a menudo eliminadas, y el orden de las\n" "instrucciones puede estar cambiado." #. type: Plain text msgid "" "However, when a program crashes unexpectedly, any debugging information is " "better than none---so the use of @option{-g} is recommended for optimized " "programs, both for development and deployment. The debugging option @option" "{-g} is enabled by default for releases of GNU packages, together with the " "optimization option @option{-O2}." msgstr "" "Sin embargo, cuando un programa falla inesperadamente, cualquier\n" "informaci@'on de depuraci@'on es mejor que nada ---as@'{@dotless{i}}\n" "el uso de @option{-g} se recomienda para programas optimizados, tanto\n" "para desarrollo como para mantenimiento. La opci@'on @option{-g} de\n" "depuraci@'on est@'a habilitada por defecto en las versiones de los\n" "paquetes GNU, junto con la opci@'on @option{-O2} de optimizaci@'on." #. type: cindex #, no-wrap msgid "optimization, and compiler warnings" msgstr "optimizaci@'on, y avisos del compilador" #. type: cindex #, no-wrap msgid "warnings, and optimization" msgstr "avisos, y optimizaci@'on" #. type: Plain text msgid "" "When optimization is turned on, GCC can produce additional warnings that do " "not appear when compiling without optimization." msgstr "" "Cuando la optimizaci@'on est@'a activa, GCC puede producir avisos\n" "adicionales que no aparecen cuando se compila sin optimizaci@'on." #. type: cindex #, no-wrap msgid "data-flow analysis" msgstr "an@'alisis de flujo de datos" #. type: Plain text msgid "" "As part of the optimization process, the compiler examines the use of all " "variables and their initial values---this is referred to as @dfn{data-flow " "analysis}. It forms the basis for other optimization strategies, such as " "instruction scheduling. A side-effect of data-flow analysis is that the " "compiler can detect the use of uninitialized variables." msgstr "" "Como parte del proceso de optimizaci@'on, el compilador examina el uso\n" "de todas las variables y sus valores iniciales ---esto es llamado\n" "un @dfn{an@'alisis de flujo de datos}. @'Esto forma la base de otras\n" "estrategias de optimizaci@'on, tales como la planificaci@'on de\n" "instrucciones. El efecto del an@'alisis del flujo de datos es que el\n" "compilador puede detectar el uso de variables indefinidas." #. type: cindex #, no-wrap msgid "@option{-Wuninitialized} option, warn about uninitialized variables" msgstr "@option{-Wuninitialized}, opci@'on de aviso de variables no inicializadas" #. type: cindex #, no-wrap msgid "@option{Wuninitialized} option, warn about uninitialized variables" msgstr "@option{Wuninitialized}, opci@'on de aviso de variables no inicializadas" #. type: Plain text msgid "" "The @option{-Wuninitialized} option (which is included in @option{-Wall}) " "warns about variables that are read without being initialized. It only " "works when the program is compiled with optimization, so that data-flow " "analysis is enabled. The following function contains an example of such a " "variable:" msgstr "" "La opci@'on @option{-Wuninitialized} (la cual est@'a incluida en\n" "@option{Wall}) avisa sobre variables que son leidas sin haber sido\n" "inicializadas. S@'olo funciona cuando el programa es compilado con\n" "optimizaci@'on, de modo que el an@'alisis del flujo de datos est@'a\n" "habilitado. La siguiente funci@'on contiene un ejemplo con tales\n" "variables:" #. type: example #, no-wrap msgid "@verbatiminclude uninit.c\n" msgstr "@verbatiminclude uninit.es.c\n" #. type: Plain text msgid "" "The function works correctly for most arguments, but has a bug when @code{x} " "is zero---in this case the return value of the variable @code{s} will be " "undefined." msgstr "" "Esta funci@'on funciona correctamente para la mayor@'{@dotless{i}}a de\n" "argumentos, pero tiene un fallo cuando @code{x} es cero ---en este\n" "caso el valor de retorno de la variable @code{s} ser@'a indefinido." #. type: Plain text msgid "" "Compiling the program with the @option{-Wall} option alone does not produce " "any warnings, because data-flow analysis is not carried out without " "optimization:" msgstr "" "Compilando el programa con la opci@'on @option{-Wall} solamente no\n" "produce ning@'un aviso, porque el an@'alisis del flujo de datos no es\n" "llevado a cabo sin optimizaci@'on:" #. type: example #, no-wrap msgid "$ gcc -Wall -c uninit.c \n" msgstr "$ gcc -Wall -c uninit.es.c \n" #. type: Plain text msgid "" "To produce a warning, the program must be compiled with @option{-Wall} and " "optimization simultaneously. In practice, the optimization level @option{-" "O2} is needed to give good warnings:" msgstr "" "Para producir avisos, el programa debe ser compilado con\n" "@option{-Wall} y optimizaci@'on simult@'aneamente. En la pr@'actica,\n" "el nivel de optimizaci@'on @option{-O2} es necesario para obtener\n" "buenos avisos:" #. type: cindex #, no-wrap msgid "uninitialized variable, warning of" msgstr "variable no inicializada, aviso de" #. type: cindex #, no-wrap msgid "variable, warning of uninitialized use" msgstr "variable, aviso de uso sin inicializar" #. type: example #, fuzzy, no-wrap #| msgid "" #| "$ gcc -Wall -O2 -c uninit.c\n" #| "uninit.c: In function ‘sign’:\n" #| "uninit.c:11:3: warning: ‘s’ may be used uninitialized \n" #| " in this function [-Wuninitialized]\n" msgid "" "$ gcc -Wall -O2 -c uninit.c\n" "uninit.c: In function 'sign':\n" "uninit.c:11:3: warning: 's' may be used uninitialized \n" " in this function [-Wuninitialized]\n" msgstr "" "$ gcc -Wall -O2 -c uninit.es.c\n" "uninit.es.c: In function ‘sign’:\n" "uninit.es.c:11:3: warning: ‘s’ may be used uninitialized \n" " in this function [-Wuninitialized]\n" #. type: Plain text msgid "" "This correctly detects the possibility of the variable @code{s} being used " "without being defined." msgstr "" "Esto detecta correctamente la posibilidad de que la variable @code{s}\n" "sea empleada sin haber sido definida." #. type: Plain text msgid "" "Note that while GCC will usually find most uninitialized variables, it does " "so using heuristics which will occasionally miss some complicated cases or " "falsely warn about others. In the latter situation, it is often possible to " "rewrite the relevant lines in a simpler way that removes the warning and " "improves the readability of the source code." msgstr "" "Observe que mientras GCC habitualmente encontrar@'a la\n" "mayor@'{@dotless{i}}a de las variables no inicializadas, se estar@'an\n" "usando heur@'{@dotless{i}}sticas que ocasionalmente fallar@'an en\n" "algunos casos complicados y otras veces falseando avisos. En esta\n" "@'ultima situaci@'on, es a menudo posible reescribir las\n" "l@'{@dotless{i}}neas relevantes de una forma sencilla que elimine los\n" "avisos y mejore la legibilidad del c@'odigo fuente." #. type: cindex #, no-wrap msgid "C++, @code{g++} as a true compiler" msgstr "C++, @code{g++} ejemplo de un compilador verdadero" #. type: cindex #, no-wrap msgid "translators, from C++ to C, compared with @code{g++}" msgstr "traductores, desde C++ a C, comparados con @code{g++}" #. type: Plain text msgid "" "This chapter describes how to use GCC to compile programs written in C++, " "and the command-line options specific to that language." msgstr "" "Este cap@'{@dotless{i}}tulo describe el uso de GCC para compilar\n" "programas escritos en C++. y las opciones espec@'{@dotless{i}}ficas de\n" "l@'{@dotless{i}}nea de comandos para este lenguaje." #. type: Plain text msgid "" "The GNU C++ compiler provided by GCC is a true C++ compiler---it compiles C+" "+ source code directly into assembly language. Some other C++ ``compilers'' " "are translators which convert C++ programs into C, and then compile the " "resulting C program using an existing C compiler. A true C++ compiler, such " "as GCC, is able to provide better support for error reporting, debugging and " "optimization." msgstr "" "El compilador GNU C++ suministrado por GCC es un verdadero compilador\n" "de C++ ---compila c@'odigo fuente directamente en lenguaje\n" "ensamblador. Otros ``compiladores'' C++ hacen la traducci@'on\n" "convirtiendo los programas C++ en programas C, y compilan el programa\n" "C resultante usando el compilador existente. Un verdadero compilador\n" "C++, tal como GCC, es capaz de proveer mejor soporte para informar los\n" "errores, depuraci@'on y optimizaci@'on." #. type: section #, no-wrap msgid "Compiling a simple C++ program" msgstr "Compilando un peque@~no programa C++" #. type: section #, no-wrap msgid "C++ compilation options" msgstr "Opciones de compilaci@'on en C++" #. type: section #, no-wrap msgid "Using the C++ standard library" msgstr "Usando la librer@'{@dotless{i}}a est@'andar de C++" #. type: section #, no-wrap msgid "Templates" msgstr "Plantillas" #. type: cindex #, no-wrap msgid "C++, compiling a simple program with @code{g++}" msgstr "C++, compilando un peque@~o programa con @code{g++}" #. type: cindex #, no-wrap msgid "@code{g++}, compiling C++ programs" msgstr "@code{g++}, compilando programas C++" #. type: cindex #, no-wrap msgid "compiling C++ programs with @code{g++}" msgstr "compilando programas C++ con @code{g++}" #. type: cindex #, no-wrap msgid "simple C++ program, compiling" msgstr "programa C++ simple, compilando" #. type: Plain text msgid "" "The procedure for compiling a C++ program is the same as for a C program, " "but uses the command @code{g++} instead of @code{gcc}. Both compilers are " "part of the GNU Compiler Collection." msgstr "" "El procedimiento para compilar un programa C++ es el mismo que para un\n" "programa C, pero usa el comando @code{g++} en vez de @code{gcc}. Ambos\n" "compiladores son parte de la colecci@'on de compiladores GNU." #. type: cindex #, no-wrap msgid "Hello World program, in C++" msgstr "Hola Mundo, programa en C++" #. type: Plain text msgid "" "To demonstrate the use of @code{g++}, here is a version of the @dfn{Hello " "World} program written in C++:" msgstr "" "Para mostrar el uso de @code{g++}, aqu@'{@dotless{i}} est@'a la\n" "versi@'on del programa @dfn{Hola Mundo} escrita en C++:" #. type: example #, no-wrap msgid "@verbatiminclude hello.cc\n" msgstr "@verbatiminclude hola.es.cc\n" #. type: Plain text msgid "The program can be compiled with the following command line:" msgstr "" "El programa puede ser compilado con la siguiente l@'{@dotless{i}}nea\n" "de comando:" #. type: example #, no-wrap msgid "$ g++ -Wall hello.cc -o hello\n" msgstr "$ g++ -Wall hola.es.cc -o hola" #. type: cindex #, no-wrap msgid "@code{.cc}, C++ file extension" msgstr "@code{.cc}, extensi@'on de fichero C++" #. type: cindex #, no-wrap msgid "@code{cc}, C++ file extension" msgstr "@code{cc}, extensi@'on de fichero C++" #. type: cindex #, no-wrap msgid "@code{.cpp}, C++ file extension" msgstr "@code{.cpp}, extensi@'on de fichero C++" #. type: cindex #, no-wrap msgid "@code{cpp}, C++ file extension" msgstr "@code{cpp}, extensi@'on de fichero C++" #. type: cindex #, no-wrap msgid "@code{.cxx}, C++ file extension" msgstr "@code{.cxx}, extensi@'on de fichero C++" #. type: cindex #, no-wrap msgid "@code{cxx}, C++ file extension" msgstr "@code{cxx}, extensi@'on de fichero C++" #. type: cindex #, no-wrap msgid "extension, @code{.C}, C++ file" msgstr "extensi@'on, @code{.C}, fichero C++" #. type: cindex #, no-wrap msgid "extension, @code{.cc}, C++ file" msgstr "extensi@'on, @code{.cc}, fichero C++" #. type: cindex #, no-wrap msgid "extension, @code{.cpp}, C++ file" msgstr "extensi@'on, @code{.cpp}, fichero C++" #. type: cindex #, no-wrap msgid "extension, @code{.cxx}, C++ file" msgstr "extensi@'on, @code{.cxx}, fichero C++" #. type: cindex #, no-wrap msgid "file extension, @code{.C}, C++ file" msgstr "file extension, @code{.C}, fichero C++" #. type: cindex #, no-wrap msgid "file extension, @code{.cc}, C++ file" msgstr "file extension, @code{.cc}, fichero C++" #. type: cindex #, no-wrap msgid "file extension, @code{.cpp}, C++ file" msgstr "file extension, @code{.cpp}, fichero C++" #. type: cindex #, no-wrap msgid "file extension, @code{.cxx}, C++ file" msgstr "file extension, @code{.cxx}, fichero C++" #. type: cindex #, no-wrap msgid "C++, file extensions" msgstr "C++, extensiones de fichero" #. type: Plain text msgid "" "The C++ frontend of GCC uses many of the same the same options as the C " "compiler @code{gcc}. It also supports some additional options for " "controlling C++ language features, which will be described in this chapter. " "Note that C++ source code should be given one of the valid C++ file " "extensions @file{.cc}, @file{.cpp}, @file{.cxx} or @file{.C} rather than the " "@file{.c} extension used for C programs." msgstr "" "El frontend C++ de GCC usa muchas opciones similares al compilador de\n" "C @code{gcc}. Adem@'as, soporta opciones adicionales para controlar\n" "las caracter@'{@dotless{i}}sticas del lenguaje C++, las cuales ser@'an\n" "descritas en este cap@'{@dotless{i}}tulo. Observe que el c@'odigo\n" "fuente C++ debe darse en una de las extensiones v@'alidas para\n" "archivos C++ @file{.cc}, @file{.cpp}, @file{cxx} o @file{.C} en vez de\n" "la extensi@'on @file{.c} usada por programas C." #. type: cindex #, no-wrap msgid "@option{-ansi} option, used with @code{g++}" msgstr "@option{-ansi}, opci@'on usada con @code{g++}" #. type: cindex #, no-wrap msgid "@option{ansi} option, used with @code{g++}" msgstr "@option{ansi}, opci@'on usada con @code{g++}" #. type: cindex #, no-wrap msgid "ISO C++, controlled with @option{-ansi} option" msgstr "ISO C++, controlado con opci@'on @option{-ansi}" #. type: cindex #, no-wrap msgid "running an executable file, C++" msgstr "ejecutando un fichero ejecutable, C++" #. type: Plain text msgid "" "The resulting executable can be run in exactly same way as the C version, " "simply by typing its filename:" msgstr "" "El ejecutable resultante puede ser ejecutado de la misma forma que la\n" "versi@'on C, simplemente tecleando su nombre:" #. type: Plain text msgid "" "The executable produces the same output as the C version of the program, " "using @code{std::cout} instead of the C @code{printf} function. All the " "options used in the @code{gcc} commands in previous chapters apply to @code{g" "++} without change, as do the procedures for compiling and linking files and " "libraries (using @code{g++} instead of @code{gcc}, of course). One natural " "difference is that the @option{-ansi} option requests compliance with the C+" "+ standard, instead of the C standard, when used with @code{g++}." msgstr "" "El ejecutable produce la misma salida que la versi@'on C del programa\n" "usando @code{std::cout} en vez de la funci@'on C @code{printf}. Todas\n" "las opciones usadas en comandos @code{gcc} en cap@'{@dotless{i}}tulos\n" "anteriores pueden aplicarse a @code{g++} sin cambios, al igual que los\n" "procedimientos para compilar y enlazar archivos y\n" "librer@'{@dotless{i}}as (usando @code{g++} en vez de @code{gcc}, por\n" "supuesto). Una natural diferencia es que la opci@'on @option{-ansi}\n" "requiere conformidad con el est@'andar C++, en vez de con el\n" "est@'andar C, cuando es usado con @code{g++}." #. type: Plain text msgid "" "Note that programs using C++ object files must always be linked with @code{g+" "+}, in order to supply the appropriate C++ libraries. Attempting to link a C" "++ object file with the C compiler @code{gcc} will cause ``undefined " "reference'' errors for C++ standard library functions:" msgstr "" "Observe que los programas que usan archivos objeto C++ deben ser\n" "enlazados con @code{g++}, con objeto de suministrar las\n" "librer@'{@dotless{i}}as necesarias. Intentar enlazar un archivo objeto\n" "C++ con el compilador de C @code{gcc} causar@'a errores del tipo\n" "``undefined reference'' para las funciones de la\n" "librer@'{@dotless{i}}a est@'andar de C++:" #. type: cindex #, no-wrap msgid "undefined reference to C++ function, due to linking with @code{gcc}" msgstr "referencia indefinida a funci@'on en C++, ocurre enlazando con @code{gcc}" #. type: example #, no-wrap msgid "" "$ g++ -Wall -c hello.cc\n" "$ gcc hello.o @r{(should use @code{g++})}\n" "hello.o: In function `main':\n" "hello.o(.text+0x1b): undefined reference to `std::cout'\n" ".....\n" "hello.o(.eh_frame+0x11): \n" " undefined reference to `__gxx_personality_v0'\n" msgstr "" "$ g++ -Wall -c hola.es.cc\n" "$ gcc hola.o @r{(deber@'{@dotless{i}}a usar @code{g++})}\n" "hola.o: In function `main':\n" "hola.o(.text+0x1b): undefined reference to `std::cout'\n" ".....\n" "hola.o(.eh_frame+0x11):\n" " undefined reference to `__gxx_personality_v0'" #. type: Plain text msgid "" "Undefined references to internal run-time library functions, such as @code" "{__gxx_personality_v0}, are also a symptom of linking C++ object files with " "@code{gcc} instead of @code{g++}.@footnote{Since these functions are " "internal, the error shown in this example will be different in other " "versions of the compiler.} Linking the same object file with @code{g++} " "supplies all the necessary C++ libraries and will produce a working " "executable:" msgstr "" "Las referencias indefinidas a funciones internas de\n" "librer@'{@dotless{i}}as en tiempo de ejecuci@'on, tales como\n" "@code{__gxx_personality_v0}, son pruebas del enlazado de archivos\n" "objetos C++ con @code{gcc} en vez de con @code{g++}.@footnote{Puesto\n" "que estas funciones son internas, el error mostrado en este ejemplo\n" "ser@'a diferente en otras versiones del compilador.} Enlazando el\n" "mismo archivo objeto con @code{g++} suministra todas las\n" "librer@'{@dotless{i}}as C++ necesarias y produce un ejecutable que\n" "funciona:" #. type: example #, no-wrap msgid "" "$ g++ hello.o\n" "$ ./a.out\n" "Hello, world!\n" msgstr "" "$ g++ hola.es.o\n" "$ ./a.out\n" "@exclamdown{}Hola, mundo!" #. type: cindex #, no-wrap msgid "@code{__gxx_personality_v0}, undefined reference error" msgstr "@code{__gxx_personality_v0}, error de referencia indefinida" #. type: cindex #, no-wrap msgid "@code{gxx_personality_v0}, undefined reference error" msgstr "@code{gxx_personality_v0}, error de referencia indefinida" #. type: cindex #, no-wrap msgid "@code{gcc}, used inconsistently with @code{g++}" msgstr "@code{gcc}, usado inconsistentemente con @code{g++}" #. type: cindex #, no-wrap msgid "undefined reference error for @code{__gxx_personality_v0}" msgstr "error de referencia indefinida para @code{__gxx_personality_v0}" #. type: Plain text msgid "" "A point that sometimes causes confusion is that @code{gcc} will actually " "compile C++ source code when it detects a C++ file extension, but cannot " "then link the resulting object files." msgstr "" "Un aspecto que algunas veces causa confusi@'on es que @code{gcc}\n" "actualmente compila c@'odigo fuente C++ cuando detecta la extensi@'on\n" "de archivos C++, pero no puede enlazar el archivo objeto resultante." #. type: example #, no-wrap msgid "" "$ gcc -Wall -c hello.cc @r{(succeeds, even for C++)}\n" "$ gcc hello.o\n" "hello.o: In function `main':\n" "hello.o(.text+0x1b): undefined reference to `std::cout'\n" msgstr "" "$ gcc -Wall -c hola.es.cc @r{(correcto, en vez de C++)}\n" "$ gcc hola.o\n" "hola.o: In function `main':\n" "hola.o(.text+0x1b): undefined reference to `std::cout'" #. type: Plain text msgid "" "To avoid this problem, use @code{g++} consistently for C++ programs and @code" "{gcc} for C programs." msgstr "" "Para eliminar este problema, use @code{g++} consistentemente para\n" "programas C++ y @code{gcc} para programas C." #. type: Plain text msgid "" "Most GCC options can be used for both C and C++ programs, but there are also " "a few options which are specific to each language. This section describes " "some of the additional options, and enhancements to existing options, that " "are available in @command{g++}." msgstr "" "La mayor@'{@dotless{i}}a de las opciones pueden ser usadas tanto para\n" "programas C como C++, pero adem@'as hay unas pocas opciones que son\n" "espec@'{@dotless{i}}ficas de cada lenguaje. Esta secci@'on describe\n" "algunas de las opciones adicionales, y las mejoras de las opciones\n" "existentes, que est@'an disponibles en @command{g++}." #. type: item #, no-wrap msgid "@option{-Wall} and @option{-W}" msgstr "@option{-Wall} y @option{-W}" #. type: table msgid "" "When compiling with @code{g++}, the options @option{-Wall} and @option{-W} " "include extra warnings specific to C++ (the warnings relate to member " "functions and virtual classes). The use of these options is always " "recommended while developing a program." msgstr "" "Cuando se compila con @code{g++}, las opciones @option{-Wall} y\n" "@option{-W} incluyen avisos extras espec@'{@dotless{i}}ficos de C++\n" "(los avisos relacionan las funciones miembro con las clases\n" "virtuales). El uso de estas opciones es siempre recomendado mientras\n" "se depura un programa." #. type: option{#1} #, no-wrap msgid "-fno-default-inline" msgstr "-fno-default-inline" #. type: cindex #, no-wrap msgid "@option{-fno-default-inline} option" msgstr "@option{-fno-default-inline}, opci@'on" #. type: cindex #, no-wrap msgid "@option{fno-default-inline} option" msgstr "@option{fno-default-inline}, opci@'on" #. type: cindex #, no-wrap msgid "@option{no-default-inline} option" msgstr "@option{no-default-inline}, opci@'on" #. type: table msgid "" "This option disables the default inlining of member functions defined in the " "bodies of C++ classes. GCC normally inlines all such functions when " "optimization is turned on, even if they do not explicitly use the @code" "{inline} keyword. Select this option if you prefer to control inlining " "yourself, or want to set a breakpoint on member functions that would " "otherwise be inlined (since it is not possible to set a breakpoint on an " "inlined function)." msgstr "" "Esta opci@'on deshabilita el inlining por defecto de las funciones\n" "miembro definidas en los cuerpos de las clases C++. GCC normalmente\n" "inlines todas las funciones posibles cuando la optimizaci@'on est@'a\n" "activada, incluso si no se us@'o expl@'{@dotless{i}}citamente la\n" "palabra reservada @code{inline}. Elija esta opci@'on si desea\n" "controlar el inlining por s@'{@dotless{i}} mismo, o si desea poner un\n" "punto de ruptura en una funci@'on miembro que en otro caso\n" "ser@'{@dotless{i}}a inlined (ya que no es posible poner un punto de\n" "ruptura en una funci@'on inlined)." #. type: option{#1} #, no-wrap msgid "-Weffc++" msgstr "-Weffc++" #. type: cindex #, no-wrap msgid "@option{-Weffc++} option" msgstr "@option{-Weffc++}, opci@'on" #. type: cindex #, no-wrap msgid "@option{Weffc++} option" msgstr "@option{Weffc++}, opci@'on" #. type: cindex #, no-wrap msgid "@option{effc++} warning option" msgstr "opci@'on de aviso @option{effc++}" #. type: table msgid "" "This option warns about C++ code which breaks some of the programming " "guidelines given in the books ``@cite{Effective C++}'' and ``@cite{More " "Effective C++}'' by Scott Meyers. For example, a warning will be given if a " "class which uses dynamically allocated memory does not define a copy " "constructor and an assignment operator. Note that the standard library " "header files do not follow these guidelines, so you may wish to use this " "option as an occasional test for possible problems in your own code rather " "than compiling with it all the time." msgstr "" "Esta opci@'on avisa sobre el c@'odigo C++ que rompe alguna de las\n" "directrices dadas en los libros ``@cite{Effective C++}'' y\n" "``@cite{More Effective C++} de Scott Meyers. Por ejemplo, se\n" "mostrar@'a un aviso si una clase usa memoria din@'amicamente ubicada\n" "si no es definida como copia de un constructor y un operador de\n" "asignaci@'on. Observe que los archivos cabeceras de las\n" "librer@'{@dotless{i}}as est@'andar no siguen estas directrices,\n" "as@'{@dotless{i}} se puede usar esta opci@'on para un test ocasional\n" "de posibles problemas en su propio c@'odigo en vez de compilar con\n" "ella todo el tiempo." #. type: option{#1} #, no-wrap msgid "-Wold-style-cast" msgstr "-Wold-style-cast" #. type: cindex #, no-wrap msgid "@option{-Wold-style-cast} option" msgstr "@option{-Wold-style-cast} option" #. type: cindex #, no-wrap msgid "@option{Wold-style-cast} option" msgstr "@option{Wold-style-cast}, opci@'on" #. type: cindex #, no-wrap msgid "@option{old-style-cast} warning option" msgstr "opci@'on de aviso @option{old-style-cast}" #. type: table msgid "" "This option highlights any uses of C-style casts in C++ programs. The C++ " "language provides the keywords @code{static_cast}, @code{dynamic_cast}, @code" "{reinterpret_cast} and @code{const_cast} for handling casts and these are " "often preferable (although C-style casts are still allowed)." msgstr "" "Esta opci@'on destaca cualquier uso de moldes con el estilo de C en\n" "programas C++. El lenguaje C++ facilita las palabras reservadas\n" "@code{static_cast}, @code{dynamic_cast}, @code{reinterpret_cast} y\n" "@code{const_cast} para manejar moldes y @'estos con preferidos a\n" "menudo (aunque los moldes al estilo C son permitidos)." #. type: cindex #, no-wrap msgid "C++, standard library" msgstr "C++, librar@'{@dotless{i}}a est@'andar" #. type: cindex #, no-wrap msgid "standard library, C++" msgstr "librer@'{@dotless{i}}a est@'andar, C++" #. type: cindex #, no-wrap msgid "library, C++ standard library" msgstr "librer@'{@dotless{i}}a, librar@'{@dotless{i}}a est@'andar C++" #. type: Plain text msgid "" "An implementation of the C++ standard library is provided as a part of GCC. " "The following program uses the standard library @code{string} class to " "reimplement the @dfn{Hello World} program:" msgstr "" "Una implementaci@'on de la librer@'{@dotless{i}}a est@'andar de C++ es\n" "suministrada como parte de GCC. El siguiente programa usa la clase\n" "@code{string} de la librar@'{@dotless{i}}a est@'andar para\n" "reimplementar el programa @dfn{Hola Mundo}:" #. type: example #, no-wrap msgid "@verbatiminclude hellostr.cc\n" msgstr "@verbatiminclude holastr.es.cc\n" #. type: Plain text msgid "The program can be compiled and run using the same commands as above:" msgstr "" "El programa puede ser compilado y ejecutado usando los comandos siguientes:" #. type: example #, no-wrap msgid "" "$ g++ -Wall hellostr.cc\n" "$ ./a.out \n" "Hello, World!\n" msgstr "" "$ g++ -Wall holastr.es.cc\n" "$./a.out\n" "@exclamdown{}Hola, Mundo!" #. type: cindex #, no-wrap msgid "C++, namespace @code{std}" msgstr "C++, espacio de nombres @code{std}" #. type: cindex #, no-wrap msgid "namespace @code{std} in C++" msgstr "espacio de nombres @code{std} en C++" #. type: cindex #, no-wrap msgid "@code{std} namespace in C++" msgstr "@code{std} espacio de nombres en C++" #. type: cindex #, no-wrap msgid "header file, without @code{.h} extension for C++" msgstr "archivo de cabecera, sin extensi@'on @code{.h} para C++" #. type: Plain text msgid "" "Note that in accordance with the C++ standard, the header files for the C++ " "library itself do not use a file extension. The classes in the library are " "also defined in the @code{std} namespace, so the directive @code{using " "namespace std} is needed to access them, unless the prefix @code{std::} is " "used throughout (as in the previous section)." msgstr "" "Observe que de acuerdo con el est@'andar C++, los archivos cabeceras\n" "de las librer@'{@dotless{i}}as C++ mismas no usan una extensi@'on de\n" "archivo. Las clases en la librer@'{@dotless{i}}a son adem@'as\n" "definidas dentro del espacio de nombres @code{std}, as@'{@dotless{i}}\n" "la directiva @code{using namespace std} es necesaria para acceder a\n" "ellas, a menos que el prefijo @code{std::} sea usado en todas partes\n" "(como en la secci@'on anterior)." #. type: cindex #, no-wrap msgid "templates, in C++" msgstr "plantillas, en C++" #. type: cindex #, no-wrap msgid "generic programming, in C++" msgstr "programaci@'on gen@'erica, en C++" #. type: cindex #, no-wrap msgid "C++, templates" msgstr "C++, plantillas" #. type: Plain text msgid "" "Templates provide the ability to define C++ classes which support @dfn" "{generic programming} techniques. Templates can be considered as a powerful " "kind of macro facility. When a templated class or function is used with a " "specific class or type, such as @code{float} or @code{int}, the " "corresponding template code is compiled with that type substituted in the " "appropriate places." msgstr "" "Las plantillas facilitan la posibilidad de definir clases C++ que\n" "soporten t@'ecnicas @dfn{gen@'ericas de programaci@'on}. Las\n" "plantillas se pueden considerar como una clase poderosa de\n" "macro. Cuando una plantilla de clase o funci@'on es usada con una\n" "clase o tipo espec@'{@dotless{i}}fico, tal como @code{float} o\n" "@code{int}, el c@'odigo correspondiente a la plantilla es compilado\n" "con el tipo sustituido en los lugares apropiados." #. type: subsection #, no-wrap msgid "Using C++ standard library templates" msgstr "Usando plantillas de librer@'{@dotless{i}}as est@'andar de C++" #. type: subsection #, no-wrap msgid "Providing your own templates" msgstr "Proporcionando sus propias plantillas" #. type: subsection #, no-wrap msgid "Explicit template instantiation" msgstr "Instanciaci@'on expl@'{@dotless{i}}cita de plantillas" #. type: node #, no-wrap msgid "The export keyword" msgstr "La palabra reservada export" #. type: cindex #, no-wrap msgid "Standard Template Library (STL)" msgstr "Standard Template Library (STL)" #. type: cindex #, no-wrap msgid "C++, standard library templates" msgstr "C++, librar@'{@dotless{i}}a est@'andar de plantillas" #. type: Plain text msgid "" "The C++ standard library @file{libstdc++} supplied with GCC provides a wide " "range of generic container classes such as lists and queues, in addition to " "generic algorithms such as sorting. These classes were originally part of " "the Standard Template Library (STL), which was a separate package, but are " "now included in the C++ standard library itself." msgstr "" "La librer@'{@dotless{i}}a est@'andar @file{libstdc++} facilitada con\n" "GCC suministra un amplio rango de contenedores de clases gen@'ericas,\n" "tales como listas y colas, en adici@'on a algoritmos generales tales\n" "como ordenaci@'on. Estas clases fueron originalmente parte de la\n" "Standard Template Library (STL), la cual era un paquete separado, pero\n" "no est@'a incluida en la misma librer@'{@dotless{i}}a est@'andar C++." #. type: Plain text msgid "" "The following program demonstrates the use of the template library by " "creating a list of strings with the template @code{list}:" msgstr "" "El siguiente programa demuestra el uso de una librar@'{@dotless{i}}a\n" "de plantillas creando una lista de cadenas con la plantilla\n" "@code{list}:" #. type: example #, no-wrap msgid "@verbatiminclude string.cc\n" msgstr "@verbatiminclude string.es.cc\n" #. type: Plain text msgid "" "No special options are needed to use the template classes in the standard " "library; the command-line options for compiling this program are the same as " "before:" msgstr "" "No son necesarias opciones especiales para usar las plantillas de\n" "clases de las librer@'{@dotless{i}}as est@'andar; las opciones de la\n" "l@'{@dotless{i}}nea de comandos para compilar este programa son las\n" "mismas de antes:" #. type: example #, no-wrap msgid "" "$ g++ -Wall string.cc\n" "$ ./a.out \n" "List size = 2\n" msgstr "" "$ g++ -Wall string.es.cc\n" "$ ./a.out\n" "# items = 2" #. type: cindex #, no-wrap msgid "@code{libstdc++}, C++ standard library" msgstr "@code{libstdc++}, librer@'{@dotless{i}}a est@'andar C++" #. type: Plain text msgid "" "Note that the executables created by @code{g++} using the C++ standard " "library will be linked to the shared library @file{libstdc++}, which is " "supplied as part of the default GCC installation. There are several " "versions of this library---if you distribute executables using the C++ " "standard library you need to ensure that the recipient has a compatible " "version of @file{libstdc++}, or link your program statically using the " "command-line option @option{-static}." msgstr "" "Observe que el ejecutable creado por @code{g++} usando la\n" "librer@'{@dotless{i}}a est@'andar de C++ enlazar@'a a la\n" "librer@'{@dotless{i}}a compartida @file{libstdc++}, la cual es\n" "suministrada como parte de la instalaci@'on por defecto de GCC. Hay\n" "varias versiones de esta librer@'{@dotless{i}}a ---si distribuye\n" "ejecutables usando la librer@'{@dotless{i}}a est@'andar de C++\n" "necesita asegurar que los destinatarios tienen una versi@'on\n" "compatible de @file{libstdc++}, o enlazar su programa est@'aticamente\n" "usando la opci@'on de l@'{@dotless{i}}nea de comandos @option{-static}." #. type: cindex #, no-wrap msgid "instantiation, of templates in C++" msgstr "instanciaci@'on, de plantillas en C++" #. type: cindex #, no-wrap msgid "C++, instantiation of templates" msgstr "C++, instanciaci@'on de plantillas" #. type: cindex #, no-wrap msgid "inclusion compilation model, in C++" msgstr "modelo de compilaci@'on de inclusi@'on, en C++" #. type: cindex #, no-wrap msgid "compilation, model for templates" msgstr "compilaci@'on, modelo para plantillas" #. type: cindex #, no-wrap msgid "templates, inclusion compilation model" msgstr "plantillas, modelo de compilaci@'on de inclusi@'on" #. type: Plain text msgid "" "In addition to the template classes provided by the C++ standard library you " "can define your own templates. The recommended way to use templates with " "@code{g++} is to follow the @dfn{inclusion compilation model}, where " "template definitions are placed in header files. This is the method used by " "the C++ standard library supplied with GCC itself. The header files can " "then be included with @samp{#include} in each source file where they are " "needed." msgstr "" "Adem@'as de las plantillas de clases suministradas por la\n" "librer@'{@dotless{i}}a est@'andar de C++ puede definir sus propias\n" "librer@'{@dotless{i}}as. La forma recomendada de usar plantillas con\n" "@code{g++} es siguiendo el @dfn{modelo de compilaci@'on de\n" "inclusi@'on}, donde las definiciones de plantillas est@'an puestas en\n" "los archivos de cabeceras. Este es el m@'etodo usado por la\n" "librer@'{@dotless{i}}a est@'andar de C++ suministrada con el mismo\n" "GCC. Los archivos de cabeceras pueden ser incluidos con\n" "@samp{#include} en cada archivo fuente donde se necesite." #. type: cindex #, no-wrap msgid "circular buffer, template example" msgstr "buffer circular, plantilla de ejemplo" #. type: cindex #, no-wrap msgid "buffer, template example" msgstr "buffer, plantilla de ejemplo" #. type: Plain text msgid "" "For example, the following template file creates a simple @code{Buffer} " "class which represents a circular buffer holding objects of type @code{T}." msgstr "" "Por ejemplo, el siguiente archivo de plantilla crea una simple clase\n" "@code{Buffer} que representar@'a un buffer circular tratando\n" "objetos del tipo @code{T}." #. type: example #, no-wrap msgid "@verbatiminclude buffer.h\n" msgstr "@verbatiminclude buffer.es.h\n" #. type: cindex #, no-wrap msgid "include guards, in header file" msgstr "guardas include, en archivo de cabecera" #. type: cindex #, no-wrap msgid "header file, with include guards" msgstr "archivo de cabecera, con guardas include" #. type: Plain text msgid "" "The file contains both the declaration of the class and the definitions of " "the member functions. This class is only given for demonstration purposes " "and should not be considered an example of good programming. Note the use " "of @dfn{include guards}, which test for the presence of the macro @w{@code" "{BUFFER_H}}, ensuring that the definitions in the header file are only " "parsed once if the file is included multiple times in the same context." msgstr "" "El archivo contiene tanto la declaraci@'on de la clase como la\n" "definici@'on de las funciones miembro. Esta clase s@'olo se muestra\n" "con prop@'ositos de demostraci@'on y no debe ser considerada un\n" "ejemplo de buena programaci@'on. Obs@'ervese el uso de @dfn{guardas\n" "include}, que comprueban la existencia de una macro\n" "@w{@code{BUFFER_H}}, asegurando que la definici@'on en el archivo de\n" "cabecera ser@'a s@'olo considerada una vez si el archivo es incluido\n" "m@'ultiples veces en el mismo contexto." #. type: Plain text msgid "" "The program below uses the templated @code{Buffer} class to create a buffer " "of size 10, storing the floating point values @math{0.25} and @math{1.25} in " "the buffer:" msgstr "" "El programa siguiente emplea la plantilla de clase @code{Buffer} para\n" "crear un buffer de tama@~no 10, almacenando los valores en coma\n" "flotante @math{0.25} y @math{1.25} en el buffer:" #. type: example #, no-wrap msgid "@verbatiminclude tprog.cc\n" msgstr "@verbatiminclude tprog.es.cc\n" #. type: Plain text msgid "" "The definitions for the template class and its functions are included in the " "source file for the program with @samp{#include \"buffer.h\"} before they " "are used. The program can then be compiled using the following command line:" msgstr "" "Las definiciones de la clase de plantilla y sus funciones est@'an\n" "incluidas en el archivo fuente del programa con @samp{#include\n" "\"buffer.es.h\"} antes de ser usada. El programa puede entonces ser\n" "compilado usando la siguiente l@'{@dotless{i}}nea de comandos:" #. type: example #, no-wrap msgid "" "$ g++ -Wall tprog.cc\n" "$ ./a.out \n" "stored value = 1.25\n" msgstr "" "$ g++ -Wall tprog.es.cc\n" "$ ./a.out\n" "valor almacenado = 1.25" #. type: Plain text msgid "" "At the points where the template functions are used in the source file, @code" "{g++} compiles the appropriate definition from the header file and places " "the compiled function in the corresponding object file." msgstr "" "En el momento en que las funciones de la plantilla son usadas en el\n" "c@'odigo fuente, @code{g++} compila las definiciones apropiadas de los\n" "archivos de cabeceras y pone las funciones compiladas en el\n" "correspondiente archivo objeto." #. type: cindex #, no-wrap msgid "multiply-defined symbol error, with C++" msgstr "error de definici@'on m@'ultiple de s@'{@dotless{i}}mbolo, con C++" #. type: cindex #, no-wrap msgid "linker, GNU compared with other linkers" msgstr "enlazador, GNU comparado con otros enlazadores" #. type: Plain text msgid "" "If a template function is used several times in a program it will be stored " "in more than one object file. The GNU Linker ensures that only one copy is " "placed in the final executable. Other linkers may report ``@dfn{multiply " "defined symbol}'' errors when they encounter more than one copy of a " "template function---a method of working with these linkers is described " "below." msgstr "" "Si una plantilla de funci@'on es usada varias veces en un mismo\n" "programa ser@'a almacenada en m@'as de un archivo objeto. El enlazador\n" "GNU asegura que s@'olo una copia ser@'a puesta en el ejecutable\n" "final. Otros enlazadores pueden devolver errores tipo\n" "``@dfn{definici@'on m@'ultiple de s@'{@dotless{i}}mbolo}'' cuando\n" "aparecen m@'as de una copia de una plantilla de funci@'on ---un\n" "m@'etodo de trabajo con estos enlazadores es descrito m@'as adelante." #. type: cindex #, no-wrap msgid "templates, explicit instantiation" msgstr "plantillas, instanciaci@'on espl@'{@dotless{i}}cita" #. type: cindex #, no-wrap msgid "instantiation, explicit vs implicit in C++" msgstr "instanciaci@'on, expl@'{@dotless{i}}cita versus impl@'{@dotless{i}}cita en C++" #. type: cindex #, no-wrap msgid "explicit instantiation of templates" msgstr "instanciaci@'on expl@'{@dotless{i}}cita de plantillas" #. type: cindex #, no-wrap msgid "@option{-fno-implicit-templates} option, disable implicit instantiation" msgstr "@option{-fno-implicit-templates}, opci@'on para deshabilitar la instanciaci@'on de plantillas" #. type: cindex #, no-wrap msgid "@option{fno-implicit-templates} option, disable implicit instantiation" msgstr "@option{fno-implicit-templates}, opci@'on para deshabilitar la instanciaci@'on de plantillas" #. type: Plain text msgid "" "To achieve complete control over the compilation of templates with @code{g+" "+} it is possible to require explicit instantiation of each occurrence of a " "template, using the option @option{-fno-implicit-templates}. This method is " "not needed when using the GNU Linker---it is an alternative provided for " "systems with linkers which cannot eliminate duplicate definitions of " "template functions in object files." msgstr "" "Para tomar un completo control sobre la compilaci@'on de plantillas\n" "con @code{g++} es posible que se requiera una instanciaci@'on\n" "expl@'{@dotless{i}}cita de cada ocurrencia de la plantilla, usando la\n" "opci@'on @option{-fno-implicit-templates}. Este m@'etodo no se\n" "necesita usando el enlazador GNU ---es un alternativa suministrada\n" "para sistemas con enlazadores que no pueden eliminar las definiciones\n" "duplicadas de funciones de plantillas en los archivos objetos." #. type: Plain text msgid "" "In this approach, template functions are no longer compiled at the point " "where they are used, as a result of the @option{-fno-implicit-templates} " "option. Instead, the compiler looks for an explicit instantiation of the " "template using the @code{template} keyword with a specific type to force its " "compilation (this is a GNU extension to the standard behavior). These " "instantiations are typically placed in a separate source file, which is then " "compiled to make an object file containing all the template functions " "required by a program. This ensures that each template appears in only one " "object file, and is compatible with linkers which cannot eliminate duplicate " "definitions in object files." msgstr "" "Con este enfoque, las funciones de plantillas no son compiladas hasta\n" "el momento donde ser@'an usadas, como resultado de la opci@'on\n" "@option{-fno-implicit-templates}. En cambio, el compilador busca una\n" "instanciaci@'on expl@'{@dotless{i}}cita de la plantilla usando la\n" "palabra reservada @code{template} con el tipo espec@'{@dotless{i}}fico\n" "para forzar su compilaci@'on (esto es una extensi@'on de GCC del\n" "comportamiento est@'andar). Estas instanciaciones son normalmente\n" "puestas en archivos fuente separados, los cuales ser@'an compilados\n" "para hacer los archivos objetos que contengan todas las funciones de\n" "plantillas requeridas por el programa. Esto garantiza que cada\n" "plantilla aparezca en un @'unico archivo objeto, y que sea compatible\n" "con enlazadores que no puedan eliminar definiciones duplicadas en\n" "archivos objeto." #. type: Plain text msgid "" "For example, the following file @file{templates.cc} contains an explicit " "instantiation of the @code{Buffer} class used by the program @file" "{tprog.cc} given above:" msgstr "" "Por ejemplo, el siguiente archivo @file{templates.es.cc} contiene una\n" "instanciaci@'on expl@'{@dotless{i}}cita de la clase\n" "@code{Buffer} usada por el programa @code{tprog.es.cc} mostrado antes:" #. type: example #, no-wrap msgid "@verbatiminclude templates.cc\n" msgstr "@verbatiminclude templates.es.cc\n" #. type: Plain text msgid "" "The whole program can be compiled and linked using explicit instantiation " "with the following commands:" msgstr "" "El programa completo puede compilarse y enlazarse usando\n" "instanciaci@'on expl@'{@dotless{i}}cita con el siguiente comando:" #. type: example #, no-wrap msgid "" "$ g++ -Wall -fno-implicit-templates -c tprog.cc\n" "$ g++ -Wall -fno-implicit-templates -c templates.cc\n" "$ g++ tprog.o templates.o\n" "$ ./a.out \n" "stored value = 1.25\n" msgstr "" "$ g++ -Wall -fno-implicit-templates -c tprog.es.cc\n" "$ g++ -Wall -fno-implicit-templates -c templates.es.cc\n" "$ g++ tprog.o templates.o\n" "$ ./a.out\n" "valor almacenado = 1.25" #. type: Plain text msgid "" "The object code for all the template functions is contained in the file @file" "{templates.o}. There is no object code for template functions in @file" "{tprog.o} when it is compiled with the @option{-fno-implicit-templates} " "option." msgstr "" "El c@'odigo objeto de todas las funciones de plantillas est@'a\n" "contenido en el archivo @code{templates.o}. No hay c@'odigo objeto\n" "para la funci@'on de plantilla en @file{tprog.o} cuando este es\n" "compilado con la opci@'on @option{-fno-implicit-templates}." #. type: Plain text msgid "" "If the program is modified to use additional types, then further explicit " "instantiations can be added to the file @file{templates.cc}. For example, " "the following code adds instantiations for Buffer objects containing @code" "{double} and @code{int} values:" msgstr "" "Si el programa es modificado para usar tipos adicionales, entonces\n" "podr@'{@dotless{i}}an a@~nadirse posteriores instanciaciones\n" "expl@'{@dotless{i}}citas en el archivo @file{templates.es.cc}. Por\n" "ejemplo, el siguiente c@'odigo a@~nade instanciaciones de objetos\n" "Buffer conteniendo valores @code{float}, @code{double} e @code{int}:" #. type: example #, no-wrap msgid "@verbatiminclude templates2.cc\n" msgstr "@verbatiminclude templates2.es.cc\n" #. type: cindex #, no-wrap msgid "C++, creating libraries with explicit instantiation" msgstr "C++, creando librer@'{@dotless{i}}as con instanciaci@'on expl@'{@dotless{i}}cita" #. type: cindex #, no-wrap msgid "libraries, creating with explicit instantiation in C++" msgstr "librer@'{@dotless{i}}as, creando con instanciaci@'on expl@'{@dotless{i}}cita en C++" #. type: Plain text msgid "" "The disadvantage of explicit instantiation is that it is necessary to know " "which template types are needed by the program. For a complicated program " "this may be difficult to determine in advance. Any missing template " "instantiations can be determined at link time, however, and added to the " "list of explicit instantiations, by noting which functions are undefined." msgstr "" "La desventaja de la instanciaci@'on expl@'{@dotless{i}}cita es que es\n" "necesario conocer qu@'e tipos de plantillas son necesarias en un\n" "programa. Para un programa complicado puede ser dif@'{@dotless{i}}cil\n" "saberlo por adelantado. Cualquier instanciaci@'on de plantilla perdida\n" "ser@'a detectada en tiempo de enlazado, sin embargo, y a@~nadida a la\n" "lista de instanciaciones expl@'{@dotless{i}}citas, anotando qu@'e\n" "funciones est@'an indefinidas." #. type: Plain text msgid "" "Explicit instantiation can also be used to make libraries of precompiled " "template functions, by creating an object file containing all the required " "instantiations of a template function (as in the file @file{templates.cc} " "above). For example, the object file created from the template " "instantiations above contains the machine code needed for Buffer classes " "with @samp{float}, @samp{double} and @samp{int} types, and could be " "distributed in a library." msgstr "" "La instanciaci@'on expl@'{@dotless{i}}cita puede ser empleada para\n" "hacer librer@'{@dotless{i}}as de funciones de plantillas\n" "precompiladas, creando un archivo objeto que contenga todas las\n" "instanciaciones de una funci@'on de plantilla (como en el archivo\n" "@file{templates.es.cc} anterior). Por ejemplo, el archivo objeto creado\n" "desde la instanciaci@'on de plantilla anterior contiene el c@'odigo\n" "m@'aquina necesario para las clases Buffer con tipos @samp{float},\n" "@samp{double} e @samp{int}, y puede ser distribuida como una\n" "librer@'{@dotless{i}}a." #. type: subsection #, no-wrap msgid "The @code{export} keyword" msgstr "La palabra reservada @code{export}" #. type: cindex #, no-wrap msgid "@code{export} keyword, not supported in GCC" msgstr "palabra reservada @code{export}, no soportada en GCC" #. type: cindex #, no-wrap msgid "templates, @code{export} keyword" msgstr "plantillas, palabra reservada @code{export}" #. type: Plain text msgid "" "At the time of writing, GCC does not support the new C++ @code{export} " "keyword (GCC 3.4.4)." msgstr "" "En el momento de escribir este libro, GCC no soportaba la nueva\n" "palabra reservada C++ @code{export}." #. type: Plain text msgid "" "This keyword was proposed as a way of separating the interface of templates " "from their implementation. However it adds its own complexity to the " "linking process, which can detract from any advantages in practice." msgstr "" "Esta palabra reservada era propuesta como una forma de separar la\n" "interfaz con las plantillas de su implementaci@'on. Sin embargo\n" "a@~nadi@'o complejidad al proceso de enlazado, lo cual en la\n" "pr@'actica podr@'{@dotless{i}}a quitar m@'eritos a cualquier ventaja." #. type: Plain text msgid "" "The @code{export} keyword is not widely used, and most other compilers do " "not support it either. The inclusion compilation model described earlier is " "recommended as the simplest and most portable way to use templates." msgstr "" "La palabra reservada @code{export} no es ampliamente usada, y la\n" "mayor@'{@dotless{i}}a de los compiladores ni la soportan. El modelo de\n" "compilaci@'nn de inclusi@'on descrito anteriormente es recomendado\n" "como el m@'as simple y la forma m@'as portable de usar plantillas." #. type: cindex #, no-wrap msgid "platform-specific options" msgstr "opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "machine-specific options" msgstr "opciones espec@'{@dotless{i}}ficas de la m@'aquina" #. type: cindex #, no-wrap msgid "options, platform-specific" msgstr "opciones, espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "@option{-m} option, platform-specific settings" msgstr "@option{-m}, opci@'on de configuraci@'on espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "@option{m} option, platform-specific settings" msgstr "@option{m}, opci@'on de configuraci@'on espec@'{@dotless{i}}fica de la plataforma" #. type: Plain text msgid "" "GCC provides a range of platform-specific options for different types of " "CPUs. These options control features such as hardware floating-point modes, " "and the use of special instructions for different CPUs. They can be " "selected with the @option{-m} option on the command line, and work with all " "the GCC language frontends, such as @code{gcc} and @code{g++}." msgstr "" "GCC proporciona un rango de opciones espec@'{@dotless{i}}ficas de la\n" "plataforma para los diferentes tipos de CPUs. Estas opciones controlan\n" "las caracter@'{@dotless{i}}sticas tales como los modos en coma\n" "flotante del hardware, y el uso de instrucciones especiales para\n" "diferentes CPUs. Estas pueden seleccionarse con la opci@'on\n" "@option{-m} en la l@'{@dotless{i}}nea de comandos, y funciona con\n" "todos los frontends de lenguajes GCC, tales como @code{gcc} y\n" "@code{g++}." #. type: Plain text msgid "" "The following sections describe some of the options available for common " "platforms. A complete list of all platform-specific options can be found in " "the GCC Reference Manual, ``@cite{Using GCC}'' (@pxref{Further reading}). " "Support for new processors is added to GCC as they become available, " "therefore some of the options described in this chapter may not be found in " "older versions of GCC." msgstr "" "La siguiente secci@'on describe algunas de las opciones disponibles\n" "para las plataformas m@'as comunes. Un listado completo de todas las\n" "opciones espec@'{@dotless{i}}ficas de la plataforma se puede encontrar\n" "en el Manual de Referencia GCC, ``@cite{Using GCC}'' (@pxref{Lectura\n" "adicional}). Soporte a nuevos procesadores es a@~nadido a GCC tan\n" "pronto como @'este est@'e disponible, por eso algunas de las opciones\n" "descritas en este cap@'{@dotless{i}}tulo no se encuentran en\n" "anteriores versiones de GCC." #. type: section #, no-wrap msgid "Intel and AMD x86 options" msgstr "Opciones para Intel y AMD x86" #. type: section #, no-wrap msgid "DEC Alpha options" msgstr "Opciones para DEC Alpha" #. type: section #, no-wrap msgid "SPARC options" msgstr "Opciones para SPARC" #. type: section #, no-wrap msgid "POWER/PowerPC options" msgstr "Opciones para POWER/PowerPC" #. type: section #, no-wrap msgid "Multi-architecture support" msgstr "Soporte de m@'ultiples arquitecturas" #. type: section #, no-wrap msgid "Floating-point issues" msgstr "Usos de coma flotante" #. type: section #, no-wrap msgid "Portability of signed and unsigned types" msgstr "Portabilidad de los tipos con signo y sin signo" #. type: cindex #, no-wrap msgid "Intel x86, platform-specific options" msgstr "Intel x86, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "AMD x86, platform-specific options" msgstr "AMD x86, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "x86, platform-specific options" msgstr "x86, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: Plain text msgid "" "The features of the widely used Intel and AMD x86 families of processors " "(386, 486, Pentium, etc) can be controlled with GCC platform-specific " "options." msgstr "" "Las caracter@'{@dotless{i}}sticas m@'as usadas de las familias de\n" "procesadores Intel y AMD x86 (386, 486, Pentium, etc) pueden ser\n" "controladas con opciones espec@'{@dotless{i}}ficas de la plataforma." #. type: Plain text msgid "" "On these platforms, GCC produces executable code which is compatible with " "all the processors in the x86 family by default---going all the way back to " "the 386. However, it is also possible to compile for a specific processor " "to obtain better performance.@footnote{Also referred to as ``targeting'' a " "specific processor.}" msgstr "" "En estas plataformas, GCC produce c@'odigo ejecutable que es\n" "compatible por defecto con todos los procesadores de la familia x86\n" "---llegando a retroceder hasta el 386. Sin embargo, es posible\n" "compilar para un procesador espec@'{@dotless{i}}fico para obtener\n" "mejores rendimientos." #. type: cindex #, no-wrap msgid "Pentium, platform-specific options" msgstr "Pentium, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "Athlon, platform-specific options" msgstr "Athlon, opciones espec@'{@dotless{i}}fias de la plataforma" #. type: Plain text msgid "" "For example, recent versions of GCC have specific support for newer " "processors such as the Pentium 4 and AMD Athlon. These can be selected with " "the following option for the Pentium 4," msgstr "" "Por ejemplo, las versiones recientes de GCC tienen soporte\n" "espec@'{@dotless{i}}fico para los m@'as nuevos procesadores tales como\n" "Pentium 4 y Athlon AMD. Estos pueden ser seleccionados para Pentium 4 con " "la\n" "siguiente opci@'on:" #. type: example #, no-wrap msgid "$ gcc -Wall -march=pentium4 hello.c\n" msgstr "$ gcc -Wall -march=pentium4 hola.es.c" #. type: cindex #, no-wrap msgid "@option{-march} option, compile for specific CPU" msgstr "@option{-march}, opci@'on para compilaci@'on para una CPU espec@'{@dotless{i}}fica" #. type: cindex #, no-wrap msgid "@option{march} option, compile for specific CPU" msgstr "@option{m}, opci@'on para compilaci@'on para una CPU espec@'{@dotless{i}}fica" #. type: Plain text msgid "and for the Athlon:" msgstr "y para el Athlon:" #. type: example #, no-wrap msgid "$ gcc -Wall -march=athlon hello.c\n" msgstr "$ gcc -Wall -march=athlon hola.es.c" #. type: Plain text msgid "" "A complete list of supported CPU types can be found in the GCC Reference " "Manual." msgstr "" "Un listado completo de los tipos de CPUs soportados se puede encontrar\n" "en el Manual de Referencia GCC." #. type: Plain text msgid "" "Code produced with a specific @option{-march=@var{CPU}} option will be " "faster but will not run on other processors in the x86 family. If you plan " "to distribute executable files for general use on Intel and AMD processors " "they should be compiled without any @option{-march} options." msgstr "" "El c@'odigo producido con una opci@'on @option{-march=@var{CPU}}\n" "espec@'{@dotless{i}}fica puede ser m@'as r@'apido pero no se\n" "ejecutar@'a en otros procesadores de la familia x86. Si planea\n" "distribuir archivos ejecutables para uso general en procesadores Intel\n" "o AMD, @'estos deber@'{@dotless{i}}an ser compilados sin ninguna\n" "opci@'on @option{-march}." #. type: cindex #, no-wrap msgid "@option{-mtune} option" msgstr "@option{-mtune}, opci@'on" #. type: cindex #, no-wrap msgid "@option{mtune} option" msgstr "@option{mtune}, opci@'on" #. type: cindex #, no-wrap msgid "@option{tune} machine-specific option" msgstr "@option{tune}, opci@'on para una m@'aquina espec@'{@dotless{i}}fica" #. type: Plain text msgid "" "As an alternative, the @option{-mcpu=@var{CPU}} option provides a compromise " "between speed and portability---it generates code that is tuned for a " "specific processor, in terms of instruction scheduling, but does not use any " "instructions which are not available on other CPUs in the x86 family." "@footnote{In recent versions of GCC this option has been renamed to @option{-" "mtune}. The older form @option{-mcpu} will continue to work.} The resulting " "code will be compatible with all the CPUs, and have a speed advantage on the " "CPU specified by @option{-mcpu}. The executables generated by @option{-" "mcpu} cannot achieve the same performance as @option{-march}, but may be " "more convenient in practice." msgstr "" "Como alternativa, la opci@'on @option{-mcpu=@var{CPU}} proporciona un\n" "compromiso entre velocidad y portabilidad ---se genera c@'odigo que\n" "ser@'a afinado para un procesador espec@'{@dotless{i}}fico, en\n" "t@'erminos de planificaci@'on de instrucciones, pero no emplea ninguna\n" "instrucci@'on que no est@'e disponible en otras CPUs de la faimlia\n" "x86.@footnote{En versiones recientes de GCC esta opci@'on ha sido\n" "renombrada a @option{-mtune}. La antigua forma @option{-mcpu}\n" "continuar@'a funcionando.} El c@'odigo resultante ser@'a compatible\n" "con todas las CPUs, y tiene una velocidad ventajosa en la CPU\n" "especificada por @option{-mcpu}. Los ejecutables generados con\n" "@option{-mcpu} no pueden lograr el mismo rendimiento que con\n" "@option{-march}, pero en la pr@'actica puede ser m@'as conveniente." #. type: subsection #, no-wrap msgid "x86 extensions" msgstr "Extensiones x86" #. type: subsection #, no-wrap msgid "x86 64-bit processors" msgstr "Procesadores x86 de 64 bits" #. type: cindex #, no-wrap msgid "SSE extensions" msgstr "extensiones SSE" #. type: cindex #, no-wrap msgid "MMX extensions" msgstr "extensiones MMX" #. type: cindex #, no-wrap msgid "illegal instruction error" msgstr "error de instrucci@'on ilegal" #. type: cindex #, no-wrap msgid "@option{-msse} and related options" msgstr "@option{-msse} y opciones relacionadas" #. type: cindex #, no-wrap msgid "@option{msse} and related options" msgstr "@option{msse} y opciones relacionadas" #. type: Plain text msgid "" "GCC can take advantage of the additional instructions in the MMX, SSE, SSE2, " "SSE3 and 3dnow extensions of recent Intel and AMD processors. The options " "@option{-mmmx}, @option{-msse}, @option{-msse2}, @option{-msse3} and @option" "{-m3dnow} enable the use of these extra instructions, allowing multiple " "words of data to be processed in parallel. The resulting executables will " "only run on processors supporting the appropriate extensions---on other " "systems they will crash with an @code{Illegal instruction} error (or " "similar).@footnote{On GNU/Linux systems, the command @code{cat /proc/" "cpuinfo} will display information about the CPU.}" msgstr "" "GCC puede obtener ventajas de las instrucciones adicionales en las\n" "extenciones MMX, SSE, SSE2, SSE3 y 3dnow de los recientes procesadores\n" "Intel y AMD. Las opciones @option{-mmmx}, @option{-msse},\n" "@option{-msse2}, @option{-mss3} y @option{-m3dnow} permiten usar\n" "instrucciones extra, permitiendo que m@'ultiples palabras de datos\n" "sean procesadas en paralelo. Los ejecutables resultantes s@'olo\n" "funcionar@'an en procesadores que soporten la apropiada extensi@'on\n" "---en otros sistemas pueden fallar con un error @code{Illegal\n" "instruction} o similar.@footnote{En sistemas GNU/Linux, el comando\n" "@code{cat /proc/cpuinfo} mostrar@'a informaci@'on de la CPU.}" #. type: cindex #, no-wrap msgid "floating point arithmetic, with SSE extensions" msgstr "aritm@'etica en coma flotante, con extensiones SSE" #. type: cindex #, no-wrap msgid "@option{-mfpmath} option, for floating-point arithmetic" msgstr "@option{-mfpmath}, opci@'on para aritm@'etica en coma flotante" #. type: cindex #, no-wrap msgid "@option{mfpmath} option, for floating-point arithmetic" msgstr "@option{mfpmath}, opci@'on para aritm@'etica en coma flotante" #. type: cindex #, no-wrap msgid "@option{fpmath} option, for floating-point arithmetic" msgstr "@option{fpmath}, opci@'on para aritm@'etica en coma flotante" #. type: Plain text msgid "" "The option @option{-mfpmath=sse} instructs GCC to use the SSE extensions for " "floating-point arithmetic where possible. For this option to take effect, " "the SSE or SSE2 extensions must first be enabled with @option{-msse} or " "@option{-msse2}." msgstr "" "La opci@'on @option{-mfpmath=sse} instruye a GCC para usar las\n" "extensiones SSE para aritm@'etica en coma flotante cuando sea\n" "posible. Para que esta opci@'on tenga efecto, las extensiones SSE o\n" "SSE2 deber@'{@dotless{i}}an primero estar habilitadas con\n" "@option{-msse} o @option{-msse2}." #. type: Plain text msgid "" "Note that the plain SSE extensions only support single precision " "operations---double precision arithmetic is part of SSE2. Since most C and C" "++ programs declare floating-point variables as @code{double} rather than " "@code{float}, the combined options @code{-msse2 -mfpmath=sse} are usually " "needed. On 64-bit processors these options are enabled by default." msgstr "" "Observe que el conjunto de extensiones SSE s@'olo soporta operaciones\n" "de simple precisi@'on ---la aritm@'etica de doble precisi@'on es parte\n" "de SSE2. Desde que la mayor@'{@dotless{i}}a de programas C y C++\n" "declaran las variables en coma flotante como @code{double} en vez de\n" "como @code{float}, las opciones combinadas @code{-msse2 -mfpmmath=sse}\n" "son frecuentemente necesarias. En procesadores de 64 bits estas\n" "opciones est@'an disponibles por defecto." #. type: cindex #, no-wrap msgid "64-bit processor-specific options, AMD64 and Intel" msgstr "opciones espec@'{@dotless{i}}ficas para procesador de 64 bits, AMD e Intel" #. type: cindex #, no-wrap msgid "AMD64, 64-bit processor specific options" msgstr "AMD64, opciones espec@'{@dotless{i}}ficas para procesador de 64 bits" #. type: Plain text msgid "" "AMD has enhanced the 32-bit x86 instruction set to a 64-bit instruction set " "called x86-64, which is implemented in their AMD64 processors.@footnote" "{Intel has added support for this instruction set as the ``Intel 64-bit " "enhancements'' on their Xeon CPUs.} On AMD64 systems GCC generates 64-bit " "code by default. The option @option{-m32} allows 32-bit code to be " "generated instead." msgstr "" "AMD ha mejorado el conjunto de instrucciones de 32 bits a un conjunto\n" "de instruciones de 64 bits denominado x86-64, el cual es implementado\n" "en sus procesadores AMD64.@footnote{Intel ha a@~nadido soporte para\n" "este conjunto de instrucciones como ``Mejoras Intel 64 bits'' a sus\n" "CPUs Xeon.} En sistemas AMD64 GCC genera c@'odigo de 64 bits por\n" "defecto. La opci@'on @option{-m32} permite en cambio que sea generado\n" "c@'odigo de 32 bits." #. type: cindex #, no-wrap msgid "@option{-mcmodel} option, for AMD64" msgstr "@option{-mcmodel}, opci@'on para AMD64" #. type: cindex #, no-wrap msgid "@option{mcmodel} option, for AMD64" msgstr "@option{mcmodel}, opci@'on para AMD64" #. type: Plain text msgid "" "The AMD64 processor has several different memory models for programs running " "in 64-bit mode. The default model is the small code model, which allows " "code and data up to 2@dmn{GB} in size. The medium code model allows " "unlimited data sizes and can be selected with @option{-mcmodel=medium}. " "There is also a large code model, which supports an unlimited code size in " "addition to unlimited data size. It is not currently implemented in GCC " "since the medium code model is sufficient for all practical purposes---" "executables with sizes greater than 2@dmn{GB} are not encountered in " "practice." msgstr "" "El procesador dispone de varios modelos de memoria diferentes para\n" "ejecutar programas en modo de 64 bits. El modelo por defecto es el\n" "modelo de c@'odigo peque@~no, el cual permite c@'odigo y datos de\n" "hasta 2@dmn{GB} de tama@~no. En el modelo de c@'odigo medio permite\n" "tama@~no ilimitado de datos y puede ser seleccionado con\n" "@option{-mcmode=medium}. Tambi@'en hay un modelo de c@'odigo grande,\n" "el cual soporta tama@~no ilimitado de c@'odigo adem@'as del tama@~no\n" "ilimitado de datos. Este no est@'a actualmente implementado en GCC una\n" "vez que el modelo de c@'odigo medio es suficiente para todos los\n" "prop@'ositos pr@'acticos ---los ejecutables con tama@~nos superiores a\n" "2@dmn{GB} en la pr@'actica no se encuentran." #. type: cindex #, no-wrap msgid "red-zone, on AMD64" msgstr "zona roja, en AMD64" #. type: cindex #, no-wrap msgid "kernel mode, on AMD64" msgstr "modo kernel, en AMD64" #. type: Plain text msgid "" "A special kernel code model @option{-mcmodel=kernel} is provided for system-" "level code, such as the Linux kernel. An important point to note is that by " "default on the AMD64 there is a 128-byte area of memory allocated below the " "stack pointer for temporary data, referred to as the ``red-zone'', which is " "not supported by the Linux kernel. Compilation of the Linux kernel on the " "AMD64 requires the options @option{-mcmodel=kernel -mno-red-zone}." msgstr "" "Un especial modelo de c@'odigo de kernel @option{-mcmodel=kernel} es\n" "facilitado para c@'odigo a nivel de sistema, tales como el kernel\n" "Linux. Un importante punto a observar es que por defecto en los AMD64\n" "hay un @'area de 128-bytes de memoria ubicada por debajo del puntero\n" "de pila de los datos temporales, referida como ``zona roja'', la cual\n" "no es soportada por el kernel Linux. La compilaci@'on del kernel Linux\n" "en un AMD64 requiere la opci@'on @option{-mcmmodel=kernel\n" "-mno-red-zone}." #. type: cindex #, no-wrap msgid "Alpha, platform-specific options" msgstr "Alpha, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "DEC Alpha, platform-specific options" msgstr "DEC Alpha, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: Plain text msgid "" "The DEC Alpha processor has default settings which maximize floating-point " "performance, at the expense of full support for IEEE arithmetic features." msgstr "" "El procesador DEC Alpha tiene por defecto una configuraci@'on que\n" "maximiza el rendimiento de la aritm@'etica en coma flotante y el coste\n" "de un soporte completo para las caracter@'{@dotless{i}}sticas de la\n" "aritm@'etica del IEEE." #. type: cindex #, no-wrap msgid "IEEE options, on DEC Alpha" msgstr "opciones IEEE, en DEC Alpha" #. type: cindex #, no-wrap msgid "@option{-mieee} option, floating-point support on DEC Alpha" msgstr "@option{-mieee}, opci@'on para soporte de coma flotante en DEC Alpha" #. type: cindex #, no-wrap msgid "@option{mieee} option, floating-point support on DEC Alpha" msgstr "@option{mieee}, opci@'on para soporte de coma flotante en DEC Alpha" #. type: cindex #, no-wrap msgid "NaN, not a number, on DEC Alpha" msgstr "NaN, no es un n@'umero, en DEC Alpha" #. type: cindex #, no-wrap msgid "Inf, infinity, on DEC Alpha" msgstr "Inf, infinito, en DEC Alpha" #. type: cindex #, no-wrap msgid "denormalized numbers, on DEC Alpha" msgstr "n@'umeros no normalizados, en DEC Alpha" #. type: cindex #, no-wrap msgid "underflow, on DEC Alpha" msgstr "desbordamiento por defecto, en DEC Alpha" #. type: cindex #, no-wrap msgid "gradual underflow, on DEC Alpha" msgstr "desbordamiento por defecto gradual, en DEC Alpha" #. type: cindex #, no-wrap msgid "soft underflow, on DEC Alpha" msgstr "desbordamiento por defecto suave, en DEC Alpha" #. type: cindex #, no-wrap msgid "zero, from underflow on DEC Alpha" msgstr "cero, desde el desbordamienbo inferior en DEC Alpha" #. type: Plain text msgid "" "Support for infinity arithmetic and gradual underflow (denormalized numbers) " "is not enabled in the default configuration on the DEC Alpha processor. " "Operations which produce infinities or underflows will generate floating-" "point exceptions (also known as @dfn{traps}), and cause the program to " "terminate, unless the operating system catches and handles the exceptions " "(which is, in general, inefficient). The IEEE standard specifies that these " "operations should produce special results to represent the quantities in the " "IEEE numeric format." msgstr "" "En la configuraci@'on por defecto en un procesador DEC Alpha no est@'a\n" "habilitado el soporte para el tratamiento del infinito y gradual\n" "desbordamiento por defecto (n@'umeros no normalizados). Las\n" "operaciones que producen el valor infinito o desbordamientos por\n" "defecto generar@'an excepciones en coma flotante (tambi@'en conocidas\n" "como @dfn{traps}), y causar@'an que el programa termine, a menos que\n" "el sistema operativo capture y maneje las excepciones (lo cual es, en\n" "general, ineficiente). El est@'andar IEEE especifica que estas\n" "operaciones deben producir un resultado especial para representar las\n" "cantidades en el formato num@'erico del IEEE." #. type: Plain text msgid "" "In most cases the DEC Alpha default behavior is acceptable, since the " "majority of programs do not produce infinities or underflows. For " "applications which require these features, GCC provides the option @option{-" "mieee} to enable full support for IEEE arithmetic." msgstr "" "En la mayor@'{@dotless{i}}a de los casos el comportamiento del DEC\n" "Alpha es aceptable, ya que la mayor@'{@dotless{i}}a de los programas\n" "no producen ni el valor infinito ni desbordamientos por defectos. Para\n" "aplicaciones que requieran estas caracter@'{@dotless{i}}sticas, GCC\n" "facilita la opci@'on @option{-mieee} para habilitar un completo\n" "soporte para la aritm@'etica del IEEE." #. type: Plain text msgid "" "To demonstrate the difference between the two cases the following program " "divides 1 by 0:" msgstr "" "Para demostrar la diferencia entre los dos casos el siguiente programa\n" "divide 1 entre 0:" #. type: cindex #, no-wrap msgid "division by zero" msgstr "divisi@'on por cero" #. type: cindex #, no-wrap msgid "zero, division by" msgstr "cero, divisi@'on por" #. type: example #, no-wrap msgid "@verbatiminclude alpha.c\n" msgstr "@verbatiminclude alpha.es.c\n" #. type: Plain text msgid "" "In IEEE arithmetic the result of 1/0 is @code{inf} (@dfn{Infinity}). If the " "program is compiled for the Alpha processor with the default settings it " "generates an exception, which terminates the program:" msgstr "" "En aritm@'etica del IEEE el resultado de 1/0 es @code{inf}\n" "(@dfn{Infinito}). Si el programa es compilado para un procesador Alpha\n" "con la configuraci@'on por defecto generar@'a una excepci@'on, que\n" "terminar@'a el programa:" #. type: example #, no-wrap msgid "" "$ gcc -Wall alpha.c\n" "$ ./a.out\n" "Floating point exception @r{(on an Alpha processor)}\n" msgstr "" "$ gcc -Wall alpha.es.c\n" "$ ./a.out\n" "Floating point exception @r{(en un procesador Alpha)}" #. type: cindex #, no-wrap msgid "floating point exception, on DEC Alpha" msgstr "excepci@'on de coma flotante, en Alpha DEC" #. type: Plain text msgid "" "Using the @option{-mieee} option ensures full IEEE compliance -- the " "division 1/0 correctly produces the result @code{inf} and the program " "continues executing successfully:" msgstr "" "Usando la opci@'on @option{-mieee} se asegura una completa conformidad\n" "con el IEEE ---La divisi@'on 1/0 produce correctamente el resultado\n" "@code{inf} y el programa continua ejecut@'andose correctamente:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -mieee alpha.c\n" "$ ./a.out \n" "x/y = inf\n" msgstr "" "$ gcc -Wall -mieee alpha.es.c\n" "$ ./a.out \n" "x/y = inf\n" #. type: Plain text msgid "" "Note that programs which generate floating-point exceptions run more slowly " "when compiled with @option{-mieee}, because the exceptions are handled in " "software rather than hardware." msgstr "" "Observe que los programas que generan excepciones en coma flotante\n" "corren m@'as lentos cuando son compilados con la opci@'on\n" "@option{-mieee}, porque las excepciones son manejadas por software en\n" "vez de por hardware." #. type: cindex #, no-wrap msgid "Sun SPARC, platform-specific options" msgstr "Sun SPARC, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "SPARC, platform-specific options" msgstr "SPARC, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "@option{-mcpu} option, compile for specific CPU" msgstr "@option{-mcpu}, opci@'on para compilar en una CPU espec@'{@dotless{i}}fica" #. type: cindex #, no-wrap msgid "@option{mcpu} option, compile for specific CPU" msgstr "@option{mcpu}, opci@'on para compilar en una CPU espec@'{@dotless{i}}fica" #. type: Plain text msgid "" "On the SPARC range of processors the @option{-mcpu=@var{CPU}} option " "generates processor-specific code. The valid options for @code{@var{CPU}} " "are @code{v7}, @code{v8} (SuperSPARC), @code{Sparclite}, @code{Sparclet} and " "@code{v9} (UltraSPARC). Code produced with a specific @option{-mcpu} option " "will not run on other processors in the SPARC family, except where supported " "by the backwards-compatibility of the processor itself." msgstr "" "En el rango de procesadores SPARC la opci@'on @option{-mcpu=@var{CPU}}\n" "genera c@'odigo espec@'{@dotless{i}}fico del procesador. Las opciones\n" "v@'alidas para @code{@var{CPU}} son @code{v7}, @code{v8} (SuperSPARC),\n" "@code{Sparclite}, @code{Sparclet} y @code{v9} (UltraSPARC). El\n" "c@'odigo producido con una opci@'on espec@'{@dotless{i}}fica no\n" "ejecutar@'a en otros procesadores de la familia SPARC, excepto cuando\n" "exista una compatibilidad hacia atr@'as en el mismo procesador." #. type: cindex #, no-wrap msgid "UltraSPARC, 32-bit mode vs 64-bit mode," msgstr "UltraSPARC, modo 32 bits versus modo 64 bits" #. type: cindex #, no-wrap msgid "word-size, on UltraSPARC" msgstr "tama@~no de palabra, en UltraSPARC" #. type: cindex #, no-wrap msgid "bits, 32 vs 64 on UltraSPARC" msgstr "bits, 32 versus 64 en UltraSPARC" #. type: cindex #, no-wrap msgid "@option{-m32} and @option{-m64} options, compile for 32 or 64-bit environment" msgstr "@option{-m32} y @option{-m64}, opciones para compilar en entornos de 32 o 64 bits" #. type: cindex #, no-wrap msgid "@option{m32} and @option{m64} options, compile for 32 or 64-bit environment" msgstr "@option{m32} y @option{m64}, opciones para compilar en entornos de 32 o 64 bits" #. type: Plain text msgid "" "On 64-bit UltraSPARC systems the options @option{-m32} and @option{-m64} " "control code generation for 32-bit or 64-bit environments. The 32-bit " "environment selected by @option{-m32} uses @code{int}, @code{long} and " "pointer types with a size of 32 bits. The 64-bit environment selected by " "@option{-m64} uses a 32-bit @code{int} type and 64-bit @code{long} and " "pointer types." msgstr "" "En sistemas UltraSPARC de 64 bits las opciones @option{-m32} y\n" "@option{-m64} controlan la generaci@'on de c@'odigo para entornos de 32\n" "@'o 64 bits. El entorno de 32 bits seleccionado por @option{-m32} usa\n" "@code{int}, @code{long} y tipos de puntero con un tama@~no de 32\n" "bits. El entorno de 64 bits seleccionado con @option{-m64} usa un tipo\n" "@code{int} de 32 bits y @code{long} y tipos de puntero de 64 bits." #. type: cindex #, no-wrap msgid "PowerPC and POWER, platform-specific options" msgstr "PowerPC y POWER, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: cindex #, no-wrap msgid "AIX, platform-specific options" msgstr "AIX, opciones espec@'{@dotless{i}}ficas de la plataforma" #. type: Plain text msgid "" "On systems using the POWER/PowerPC family of processors the option @option{-" "mcpu=@var{CPU}} selects code generation for specific CPU models. The " "possible values of @code{@var{CPU}} include @samp{power}, @samp{power2}, " "@samp{powerpc}, @samp{powerpc64} and @samp{common}, in addition to other " "more specific model numbers. Code generated with the option @option{-" "mcpu=common} will run on any of the processors." msgstr "" "En sistemas que usan la familia de procesadores POWER/PowerPC la\n" "opci@'on @option{-mcpu=@var{CPU}} selecciona la generaci@'on de\n" "c@'odigo espec@'{@dotless{i}}fico para los modelos de CPU.\n" "Los posibles valores de @code{@var{CPU}} incluyen @samp{power},\n" "@samp{power2}, @samp{powerpc}, @samp{powerpc64} y @samp{common},\n" "adem@'as de otros n@'umeros de modelos espec@'{@dotless{i}}ficos. El\n" "c@'odigo generado con la opci@'on @option{-mcpu=common} se ejecutar@'a\n" "en cualquiera de los procesadores." #. type: cindex #, no-wrap msgid "Altivec, on PowerPC" msgstr "Altivec, en PowerPC" #. type: cindex #, no-wrap msgid "@option{-maltivec} option, enables use of Altivec processor on PowerPC" msgstr "@option{-maltivec}, opci@'on que habilita el uso del procesador Altivec en PowerPC" #. type: cindex #, no-wrap msgid "@option{maltivec} option, enables use of Altivec processor on PowerPC" msgstr "@option{maltivec}, opci@'on que habilita el uso del procesador Altivec en PowerPC" #. type: Plain text msgid "" "The option @option{-maltivec} enables use of the Altivec vector processing " "instructions, if the appropriate hardware support is available." msgstr "" "La opci@'on @option{-maltivec} habilita el uso del vector Altivec de\n" "procesamiento de instrucciones, si el soporte del hardware apropiado\n" "est@'a disponible." #. type: cindex #, no-wrap msgid "multiply and add instruction" msgstr "multiplicar y a@~nadir instrucci@'on" #. type: cindex #, no-wrap msgid "fused multiply and add instruction" msgstr "instrucci@'on fusionada de multiplicaci@'on y suma" #. type: cindex #, no-wrap msgid "combined multiply and add instruction" msgstr "instrucci@'on combinada de multiplicaci@'on y suma" #. type: cindex #, no-wrap msgid "@option{-mno-fused-madd} option, on PowerPC" msgstr "@option{-mno-fused-madd}, opci@'on en PowerPC" #. type: cindex #, no-wrap msgid "@option{mno-fused-madd} option, on PowerPC" msgstr "@option{mno-fused-madd}, opci@'on en PowerPC" #. type: Plain text msgid "" "The POWER/PowerPC processors include a combined ``multiply and add'' " "instruction @math{a * x + b}, which performs the two operations " "simultaneously for speed---this is referred to as a @dfn{fused} multiply and " "add, and is used by GCC by default. Due to differences in the way " "intermediate values are rounded, the result of a fused instruction may not " "be exactly the same as performing the two operations separately. In cases " "where strict IEEE arithmetic is required, the use of the combined " "instructions can be disabled with the option @option{-mno-fused-madd}." msgstr "" "Los procesadores POWER/PowerPC incluyen una instrucci@'on combinada\n" "``multiplicaci@'on y suma'' @math{a * x + b}, la cual realiza las dos\n" "operaciones simult@'aneamente para ganar en velocidad ---esto es\n" "referido como una @dfn{fusi@'on} de multiplicaciones y sumas, y es\n" "usado por defecto en GCC. Debido a las diferentes formas en que los\n" "valores intermedios son redondeados, el resultado de una instrucci@'on\n" "fundida puede no tener exactamente igual rendimiento que dos\n" "operaciones separadas. En los casos en que es requerida\n" "estrictamente la aritm@'etica IEEE, el uso de las\n" "instrucciones combinadas puede ser deshabilitado con la opci@'on\n" "@option{-mno-fuser-madd}." #. type: cindex #, no-wrap msgid "TOC overflow error, on AIX" msgstr "error de desbordamiento TOC, en AIX" #. type: cindex #, no-wrap msgid "table of contents, overflow error on AIX" msgstr "tabla de contenidos, error de desbordamiento en AIX" #. type: cindex #, no-wrap msgid "overflow error, for TOC on AIX" msgstr "error de desbordamiento, para TOC en AIX" #. type: cindex #, no-wrap msgid "AIX, TOC overflow error" msgstr "AIX, error de desboramiento TOC" #. type: cindex #, no-wrap msgid "@option{-mminimal-toc} option, on AIX" msgstr "@option{-mminimal-toc}, opci@'on en AIX" #. type: cindex #, no-wrap msgid "@option{mminimal-toc} option, on AIX" msgstr "@option{mminimal-toc}, opci@'on en AIX" #. type: Plain text msgid "" "On AIX systems, the option @option{-mminimal-toc} decreases the number of " "entries GCC puts in the global @dfn{table of contents} (TOC) in executables, " "to avoid ``TOC overflow'' errors at link time." msgstr "" "En sistemas AIX, la opci@'on @option{-mminimal-toc} disminuye el\n" "n@'umero de entradas GCC puestas en la @dfn{tabla de contextos} global\n" "(TOC) de los ejecutables para anular los errores ``TOC overflow'' en\n" "tiempo de enlazado." #. type: cindex #, no-wrap msgid "@option{-mxl-call} option, compatibility with IBM XL compilers on AIX" msgstr "@option{-mxl-call}, opci@'on para compatibilidad con compiladores IBM XL en AIX" #. type: cindex #, no-wrap msgid "@option{mxl-call} option, compatibility with IBM XL compilers on AIX" msgstr "@option{mxl-call}, opci@'on para compatibilidad con compiladores IBM XL en AIX" #. type: cindex #, no-wrap msgid "IBM XL compilers, compatibility on AIX" msgstr "compiladores IBM XL, compatibilidad en AIX" #. type: cindex #, no-wrap msgid "XL compilers, compatibility on AIX" msgstr "compiladores XL, compatibilidad en AIX" #. type: cindex #, no-wrap msgid "AIX, compatibility with IBM XL compilers" msgstr "AIX, compatibilidad con compiladores IBM XL" #. type: Plain text msgid "" "The option @option{-mxl-call} makes the linking of object files from GCC " "compatible with those from IBM's XL compilers." msgstr "" "La opci@'on @option{-mxl-call} realiza el enlazado de archivos objetos\n" "de GCC compatible con los compiladores de IBM's XL." #. type: cindex #, no-wrap msgid "@option{-pthread} option, on AIX" msgstr "@option{-pthread}, opci@'on en AIX" #. type: cindex #, no-wrap msgid "@option{pthread} option, on AIX" msgstr "@option{pthread}, opci@'on en AIX" #. type: cindex #, no-wrap msgid "threads, on AIX" msgstr "hilos, en AIX" #. type: Plain text msgid "" "For applications using POSIX threads, AIX always requires the option @option" "{-pthread} when compiling, even when the program will only run in single-" "threaded mode." msgstr "" "Para aplicaciones que usan hilos POSIX, AIX siempre requiere la\n" "opci@'on @option{-pthread} en compilaci@'on, incluso cuando el\n" "programa s@'olo se ejecute en modo hilo simple." #. type: cindex #, no-wrap msgid "multi-architecture support, discussion of" msgstr "soporte a m@'ultiples arquitecturas, discusi@'on de" #. type: cindex #, no-wrap msgid "MIPS64, multi-architecture support" msgstr "MIPS64, soporte a m@'ultiples arquitecturas" #. type: cindex #, no-wrap msgid "Sparc64, multi-architecture support" msgstr "Sparc64, soporte a m@'ultiples arquitecturas" #. type: cindex #, no-wrap msgid "PowerPC64, multi-architecture support" msgstr "PowerPC, soporte a m@'ultiples arquitecturas" #. type: cindex #, no-wrap msgid "ARM, multi-architecture support" msgstr "ARM, soporte a m@'ultiples arquitecturas" #. type: cindex #, no-wrap msgid "Thumb, alternative code format on ARM" msgstr "Thumb, formato alternativo de c@'odigo en ARM" #. type: Plain text msgid "" "A number of platforms can execute code for more than one architecture. For " "example, 64-bit platforms such as AMD64, MIPS64, Sparc64, and PowerPC64 " "support the execution of both 32-bit and 64-bit code. Similarly, ARM " "processors support both ARM code and a more compact code called ``Thumb''. " "GCC can be built to support multiple architectures on these platforms. By " "default, the compiler will generate 64-bit object files, but giving the " "@option{-m32} option will generate a 32-bit object file for the " "corresponding architecture.@footnote{The options @option{-maix64} and @option" "{-maix32} are used on AIX.}" msgstr "" "Un n@'umero de plataformas puede ejecutar c@'odigo para m@'as de una\n" "arquitectura. Por ejemplo, plataformas de 64 bits como AMD64, MIPS64,\n" "Sparc64 y PowerPC64 soportan la ejecuci@'on de c@'odigo tanto de 32\n" "como de 64 bits. De forma an@'aloga, los procesadores ARM soportan\n" "tanto c@'odigo de ARM como un c@'odigo m@'as compacto denominado\n" "``Thumb''. GCC puede ser construido para soportar m@'ultiples\n" "arquitecturas en estas plataformas. Por defecto, el compilador\n" "generar@'a archivos objetos de 64 bits, pero dando la opci@'on\n" "@option{-m32} generar@'a archivos objetos de 32 bits para la\n" "correspondiente arquitectura.@footnote{Las opciones @option{-maix64} y\n" "@option{-maix32} son empleadas en AIX.}" #. type: cindex #, no-wrap msgid "Itanium, multi-architecture support" msgstr "Itanium, soporte a m@'ultiples plataformas" #. type: Plain text msgid "" "Note that support for multiple architectures depends on the corresponding " "libraries being available. On 64-bit platforms supporting both 64 and 32-" "bit executables, the 64-bit libraries are often placed in @file{lib64} " "directories instead of @file{lib} directories, e.g. in @file{/usr/lib64} and " "@file{/lib64}. The 32-bit libraries are then found in the default @file" "{lib} directories as on other platforms. This allows both a 32-bit and a 64-" "bit library with the same name to exist on the same system. Other systems, " "such as the IA64/Itanium, use the directories @file{/usr/lib} and @file{/" "lib} for 64-bit libraries. GCC knows about these paths and uses the " "appropriate path when compiling 64-bit or 32-bit code." msgstr "" "Observe que el soporte de m@'ultiples plataformas depende de la\n" "disponibilidad de las librer@'{@dotless{i}}as correspondientes. En\n" "plataformas de 64 bits que soportan ejecutables tanto de 64 como 32\n" "bits, las librer@'{@dotless{i}}as de 64 bits son a menudo puestas en\n" "directorios @file{lib64} en vez de en directorios @file{lib}, p.e. en\n" "@file{/usr/lib64} y @file{/lib64}. Las librer@'{@dotless{i}}as de 32\n" "bits se encuentran por defecto en directorios @file{lib} de otras\n" "plataformas. Esto permite que las librer@'{@dotless{i}}as tanto de 32\n" "bits como de 64 bits puedan existir con el mismo nombre y en el mismo\n" "sistema. Otros sistemas, como el IA64/Itanium, emplea los directorios\n" "@file{/usr/lib} y @file{/lib} para las librer@'{@dotless{i}}as de 64\n" "bits. GCC conoce estos caminos y los emplea apropiadamente cuando\n" "compila c@'odigo para 64 bits @'o 32 bits." #. type: cindex #, no-wrap msgid "floating point, portability problems" msgstr "coma flotante, problemas de portabilidad" #. type: cindex #, no-wrap msgid "arithmetic, floating-point" msgstr "aritm@'etica, coma flotante" #. type: cindex #, no-wrap msgid "numerical differences" msgstr "diferencias num@'ericas" #. type: tex #, no-wrap msgid "$\\a\\ \\\\times 10^{ \\b\\ }$@comment\n" msgstr "$\\a\\ \\\\times 10^{ \\b\\ }$@comment\n" #. type: ifnottex msgid "\\a\\*10^\\b\\" msgstr "\\a\\*10^\\b\\@comment \n" #. type: tex #, no-wrap msgid "$\\a\\^{ \\b\\ }$@comment\n" msgstr "$\\a\\^{ \\b\\ }$@comment\n" #. type: ifnottex msgid "\\a\\^\\b\\" msgstr "\\a\\^\\b\\@comment \n" #. type: tex #, no-wrap msgid "$\\a\\^{\\\\pm \\b\\ }$@comment\n" msgstr "$\\a\\^{\\\\pm \\b\\ }$@comment\n" #. type: ifnottex msgid "\\a\\^(+/-\\b\\)" msgstr "\\a\\^(+/-\\b\\)@comment \n" #. type: cindex #, no-wrap msgid "IEEE arithmetic" msgstr "aritm@'etica IEEE" #. type: Plain text msgid "" "The IEEE-754 standard defines the bit-level behavior of floating-point " "arithmetic operations on all modern processors. This allows numerical " "programs to be ported between different platforms with identical results, in " "principle. In practice, there are often minor variations caused by " "differences in the order of operations (depending on the compiler and " "optimization level) but these are generally not significant." msgstr "" "El est@'andar IEEE-754 define el comportamiento a nivel de bit de las\n" "operaciones aritm@'eticas en coma flotante en todos los procesadores\n" "modernos. Esto permite que los programas num@'ericos sean portados\n" "entre diferentes plataformas con id@'enticos resultados, en\n" "principio. En la pr@'actica, hay a menudo peque@~nas variaciones\n" "causadas por las diferencias en el orden de las operaciones\n" "(dependiendo de los niveles de compilaci@'on y optimizaci@'on) pero\n" "generalemnte son insignificantes." #. type: cindex #, no-wrap msgid "x86, floating-point arithmetic" msgstr "x86, aritm@'etica en coma flotante" #. type: cindex #, no-wrap msgid "Motorola 680x0, floating-point arithmetic" msgstr "Motorola 680x0, aritm@'etica en coma flotante" #. type: cindex #, no-wrap msgid "native double-precision processors" msgstr "procesadores con doble precisi@'on nativa" #. type: cindex #, no-wrap msgid "double precision" msgstr "doble precisi@'on" #. type: cindex #, no-wrap msgid "extended precision, x86 processors" msgstr "precisi@'on extendida, procesadores x86" #. type: Plain text msgid "" "However, more noticeable discrepancies can be seen when porting numerical " "programs between x86 systems and other platforms, because the the x87 " "floating point unit (FPU) on x86 processors computes results using extended " "precision internally (the values being converted to double precision only " "when they are stored to memory). In contrast, processors such as SPARC, PA-" "RISC, Alpha, MIPS and POWER/PowerPC work with native double-precision values " "throughout.@footnote{Motorola 68k processors also use extended precision " "registers, like the x86.} The differences between these implementations lead " "to changes in rounding and underflow/overflow behavior, because intermediate " "values have a greater relative precision and exponent range when computed in " "extended precision.@footnote{For quantities held in the x87 extended-" "precision registers the relative precision is @scinum{5.42,-20} and the " "exponent range is @scirange{10,4932}. Standard double precision values have " "a relative precision of @scinum{2.22,-16} and an exponent range of @scirange" "{10,308}.} In particular, comparisons involving extended precision values " "may fail where the equivalent double precision values would compare equal." msgstr "" "Sin embargo, se pueden apreciar m@'as notables discrepancias cuando se\n" "portan programas num@'ericos entre sitemas x86 y otras plataformas,\n" "porque la unidad de coma flotante x87 (FPU) en los procesadores x86\n" "procesan los resultados empleando internamente precisi@'on extendida\n" "(los valores ser@'an convertidos a doble precisi@'on s@'olo cuando son\n" "almacenados en memoria). En contraste, procesadores como SPARC,\n" "PA-RISC, Alpha, MIPS y POWER/PowerPC funcionan con valores en doble\n" "precisi@'on nativos.@footnote{Los procesadores Motorola 68k tambi@'en\n" "usan registros de precisi@'on extendida, como el x86.} Las diferencias\n" "entre estas implementaciones provocan cambiar el comportamiento en el\n" "redondeo y en undeflow/overflow, porque los valores intermedios tienen\n" "mayor precisi@'on relativa y rango de exponentes cuando son procesados\n" "en precisi@'on extendida.@footnote{Para tener cantidades en registros\n" "de precisi@'on extendida x87 la precisi@'on relativa es\n" "@scinum{5.42,-20} y el rango del exponente es @scirange{10,4932}. Los\n" "valores est@'andar de doble precisi@'on tienen una precisi@'on\n" "relativa de @scinum{2.22,-16} y un rango del exponente de\n" "@scirange{10,308}.} En particular, las comparaciones que afectan a\n" "valores en precisi@'on extendida pueden fallar donde los valores en\n" "doble precisi@'on equivalente deber@'{@dotless{i}}a comparar igual." #. type: cindex #, no-wrap msgid "rounding, floating-point arithmetic" msgstr "redondeo, aritm@'etica de coma flotante" #. type: cindex #, no-wrap msgid "overflow, floating-point arithmetic" msgstr "desbordamiento, aritm@'etica de coma flotante" #. type: cindex #, no-wrap msgid "underflow, floating-point arithmetic" msgstr "desbordamiento inferior, aritm@'etica de coma flotante" #. type: Plain text msgid "" "To avoid these incompatibilities, the x87 FPU also offers a hardware double-" "precision rounding mode. In this mode the results of each extended-" "precision floating-point operation are rounded to double precision in the " "floating-point registers by the FPU. It is important to note that the " "rounding only affects the precision, not the exponent range, so the result " "is a hybrid double-precision format with an extended range of exponents." msgstr "" "Para evitar esta incompatibilidad, la unidad de coma flotante (FPU)\n" "ofrece a menudo un modo del hardware redondeando la doble\n" "precisi@'on. En este modo el resultado de cada operaci@'on en coma\n" "flotante con precisi@'on extendida es redondeada a doble precisi@'on\n" "en registros en coma flotante por la FPU. Es importante observar que\n" "el redondeo s@'olo afecta a la precisi@'on, y no al rango del\n" "exponente, as@'{@dotless{i}} el resultado es un formato\n" "h@'{@dotless{i}}brido de doble precisi@'on con un rango extendido de\n" "exponentes." #. type: cindex #, no-wrap msgid "FreeBSD, floating-point arithmetic" msgstr "FreeBSD, aritm@'etica de coma flotante" #. type: cindex #, no-wrap msgid "NetBSD, floating-point arithmetic" msgstr "NetBSD, aritm@'etica de coma flotante" #. type: cindex #, no-wrap msgid "OpenBSD, floating-point arithmetic" msgstr "OpenBSD; aritm@'etica de coma flotante" #. type: cindex #, no-wrap msgid "GNU/Linux, floating-point arithmetic" msgstr "GNU/Linux, aritm@'etica de coma flotante" #. type: cindex #, no-wrap msgid "Linux kernel, floating-point" msgstr "kernel Linux, coma flotante" #. type: cindex #, no-wrap msgid "@code{fldcw} set floating point mode" msgstr "@code{fldcw} activar modo de coma flotante" #. type: cindex #, no-wrap msgid "machine instruction, @code{asm} keyword" msgstr "instrucci@'on m@'aquina, palabra reservada @code{asm}" #. type: Plain text msgid "" "On BSD systems such as FreeBSD, NetBSD and OpenBSD, the hardware double-" "precision rounding mode is the default, giving the greatest compatibility " "with native double precision platforms. On x86 GNU/Linux systems the " "default mode is extended precision (with the aim of providing increased " "accuracy). To enable the double-precision rounding mode it is necessary to " "override the default setting on per-process basis using the @sc{fldcw} " "``floating-point load control-word'' machine instruction.@footnote{The " "operating system saves and restores the control word when switching between " "processes, so that each process maintains its own setting.} A simple " "function which can be called to execute this instruction is shown below. It " "uses the GCC extension keyword @code{asm} to insert the specified " "instruction in the assembly language output:" msgstr "" "En sistemas BSD tales como FreeBSD, NetBSD y OpenBSD, el modo hardware\n" "de redondeo de doble precisi@'on est@'a por defecto. Alcanzado la\n" "mayor compatibilidad con plataformas con doble precisi@'on nativa. En\n" "sistemas x86 GNU/Linux el modo por defecto es precisi@'on extendida\n" "(con la aspiraci@'on de suministrar un incremento en la\n" "precisi@'on). Para habilitar el modo de redondeo de doble precisi@'on\n" "es necesario anular la configuraci@'on por defecto en la base por\n" "procesos usando la instrucci@'on de m@'aquina @sc{fldcw}\n" "``floating-point load control-word''.@footnote{El sistema operativo\n" "guarda y recupera la palabra de control cuando alterna entre procesos,\n" "as@'{@dotless{i}} que cada proceso mantiene su propia\n" "configuraci@'on.} Una simple funci@'on puede ser invocada para\n" "ejecutar estas instrucciones que se muestran a continuaci@'on. Se usa\n" "la palabra reservada de la extensi@'on de GCC @code{asm} para insertar\n" "la instrucci@'on espec@'{@dotless{i}}fica en la salida del lenguaje\n" "ensamblador:" #. type: example #, no-wrap msgid "@verbatiminclude setfpu.c\n" msgstr "@verbatiminclude setfpu.es.c\n" #. type: Plain text msgid "" "The appropriate @code{mode} setting for double-precision rounding is @code" "{0x27F}. The mode value also controls the floating-point exception handling " "behavior and rounding-direction (see the Intel and AMD processor reference " "manuals for details)." msgstr "" "La apropiada configuraci@'on de @code{mode} para el redondeo en doble\n" "precisi@'on es @code{0x27F}. El valor del modo tambi@'en controla el\n" "comportamiento del manejo de la excepci@'on de coma flotante y la\n" "direcci@'on de redondeo (para m@'as detalles vea el manual de referencia de " "los\n" "procesadores Intel y AMD)." #. type: cindex #, no-wrap msgid "floating point exception handling" msgstr "manejando de excepci@'on de coma flotante" #. type: cindex #, no-wrap msgid "exception handling, floating-point" msgstr "manejando excepci@'on, coma flotante" #. type: Plain text msgid "" "On x86 GNU/Linux, the function above can be called at the start of any " "program to disable excess precision. This will then reproduce the results " "of native double-precision processors, in the absence of underflows and " "overflows." msgstr "" "En sistemas x86 GNU/Linux, la funci@'on anterior puede ser llamada al\n" "inicio de cualquier programa para deshabilitar precisi@'on\n" "excesiva. Esto reproducir@'a el resultado de los procesadores de doble\n" "precisi@'on nativa, en ausencia de desbordamientos por exceso y por\n" "defecto." #. type: Plain text msgid "The following program demonstrates the different rounding modes:" msgstr "El siguiente programa demuestra los diferentes modos de redondeo:" #. type: example #, no-wrap msgid "@verbatiminclude fptest2.c\n" msgstr "@verbatiminclude fptest2.es.c\n" #. type: Plain text msgid "" "On x86 GNU/Linux systems the comparison @code{c == a / b} can produce an " "unexpected result if @code{c} is taken from memory (double precision) while " "@code{a / b} is computed in extended precision, because the fraction 3/7 has " "different representations in double and extended precision." msgstr "" "En sistemas x86 GNU/Linux la comparaci@'on @code{c == a / b} puede\n" "producir un resultado inesperado si @code{c} es tomado desde memoria\n" "(doble precisi@'on) mientras que @code{a / b} es procesado en\n" "precisi@'on extendida, porque la fracci@'on 3/7 tiene diferentes\n" "representaciones en precisi@'on doble y extendida." #. type: example #, fuzzy, no-wrap msgid "" "$ gcc -Wall fptest2.c\n" "$ ./a.out \n" "unexpecedt result\n" msgstr "" "$ gcc -Wall fptest2.es.c\n" "$ ./a.out\n" "resultado inesperado\n" #. type: Plain text msgid "" "Setting the hardware rounding mode to double precision prevents this from " "happening:" msgstr "" "Configurando el modo de redondeo hardware a doble precisi@'on previene\n" "que lo anterior suceda:" #. type: example #, fuzzy, no-wrap msgid "" "$ gcc -Wall -DDOUBLE fptest2.c\n" "$ ./a.out \n" "comparison succeeds\n" msgstr "" "$ gcc -Wall -DDOUBLE fptest2.es.c\n" "$ ./a.out\n" "comparaci@'on exitosa" #. type: Plain text msgid "" "Note that the floating-point control word affects the whole environment of " "the process, including any C Library functions that are called. One " "consequence of this is that @code{long double} arithmetic is effectively " "reduced to double precision, since it relies on extended precision " "operations." msgstr "" "Observe que la palabra de control de la coma flotante afecta al\n" "entorno completo del proceso, incluyendo las funciones de\n" "librer@'{@dotless{i}}as C que sean invocadas. Una consecuencia de esto\n" "es que la aritm@'etica en coma flotante es reducida eficientemente a\n" "doble precisi@'on, desde que se conf@'{@dotless{i}}a en operaciones de\n" "precisi@'on extendida." #. type: cindex #, no-wrap msgid "long double arithmetic" msgstr "aritm@'etica en coma flotante" #. type: cindex #, no-wrap msgid "SSE/SSE2 precision" msgstr "precisi@'on SSE/SSE2" #. type: Plain text msgid "" "The floating point control word only affects the behavior of the x87 FPU. " "Floating point operations computed with SSE and SSE2 instructions are always " "carried out in native double precision. Thus, the combined options" msgstr "" "La palabra de control de la coma flotante s@'olo afecta al\n" "comportamiento de FPU x87. Las operaciones en coma flotante procesadas\n" "con instrucciones de SSE y SSE2 son siempre llevadas a cabo en doble\n" "precisi@'on nativa. As@'{@dotless{i}}, las opciones combinadas" #. type: example #, no-wrap msgid "$ gcc -Wall -msse2 -mfpmath=sse ...\n" msgstr "$ gcc -Wall -msse2 -mfpmath=sse ..." #. type: Plain text msgid "" "are often sufficient to remove the effects of extended-precision. However, " "some operations (such as transcendental functions) are not available in the " "SSE/SSE2 extensions and will still be computed on the x87 FPU." msgstr "" "son a menudo suficientes para eliminar los efectos de la precisi@'on\n" "extendida. Sin embargo, algunas operaciones (tales como funciones\n" "transcendentales) no est@'an disponibles en las extensiones SSE/SSE2 y\n" "ser@'an procesadas por el FPU x87." #. type: cindex #, no-wrap msgid "signed @code{char} option" msgstr "opci@'on @code{char} con signo" #. type: cindex #, no-wrap msgid "unsigned @code{char} option" msgstr "opci@'on @code{char} sin signo" #. type: cindex #, no-wrap msgid "@code{char}, portability of signed vs unsigned" msgstr "@code{char}, portabilidad con signo versus sin signo" #. type: Plain text msgid "" "The C and C++ standards allows the character type @code{char} to be signed " "or unsigned, depending on the platform and compiler. Most systems, " "including x86 GNU/Linux and Microsoft Windows, use signed @code{char}, but " "those based on PowerPC and @sc{arm} processors typically use unsigned @code" "{char}.@footnote{MacOS X (Darwin) on PowerPC uses signed @code{char}, for " "consistency with other Darwin architectures.} This can lead to unexpected " "results when porting programs between platforms which have different " "defaults for the type of @code{char}." msgstr "" "Los est@'andares C y C++ permiten que el tipo car@'acter @code{char}\n" "sea con signo o sin signo, dependiendo de la plataforma y el\n" "compilador. La mayor@'{@dotless{i}}a de los sistemas, incluidos x86\n" "GNU/Linux y Microsoft Windows, usan @code{char} con signo, pero\n" "aquellos basados en PowerPC y procesadores @sc{arm} usan habitualmente\n" "@code{char} sin signo.@footnote{MacOS X (Drawin) en PowerPC usa\n" "@code{char} con signo, por consistencia con otras arquitecturas\n" "Darwin.} Esto puede causar resultados inexperados cuando se portan\n" "programas entre plataformas que tienen diferentes tipos @code{char}\n" "por defecto." #. type: Plain text msgid "" "The following code demonstrates the difference between platforms with signed " "and unsigned @code{char} types:" msgstr "" "El siguiente c@'odigo demuestra la diferencia entre plataformas con\n" "tipos @code{char} con signo y sin signo: " #. type: example #, no-wrap msgid "@verbatiminclude signed.c\n" msgstr "@verbatiminclude signed.es.c\n" #. type: Plain text msgid "" "With an unsigned @code{char}, the variable @code{c} takes the value 255, but " "with a signed @code{char} it becomes @math{-1}." msgstr "" "Con un @code{char} sin signo, la variable @code{c} toma el valor 255,\n" "pero con un @code{char} con signo viene a ser @math{-1}." #. type: Plain text msgid "" "The correct way to manipulate @code{char} variables in C is through the " "portable functions declared in @file{ctype.h}, such as @code{isalpha}, @code" "{isdigit} and @code{isblank}, rather than by their numerical values. The " "behavior of non-portable conditional expressions such as @code{c > 'a'} " "depends on the signedness of the @code{char} type. If the signed or " "unsigned version of @code{char} is explicitly required at certain points in " "a program, it can be specified using the declarations @code{signed char} or " "@code{unsigned char}." msgstr "" "La forma correcta de manipular variables @code{char} en C es a trav@'es\n" "de las funciones portables declaradas en @file{ctype.h}, tales como\n" "@code{isalpha}, @code{isdigit} y @code{isblank}, en vez de sus valores\n" "num@'ericos. El comportamiento de las expresiones condicionales no\n" "portables tales como @code{c > 'a'} depende del signado del tipo\n" "@code{char}. Si se requiere expl@'{@dotless{i}}citamente una versi@'on\n" "con signo o sin signo en cierto punto de un programa, se puede\n" "especificar usando @code{signed char} o @code{unsigned char}." #. type: Plain text #, fuzzy msgid "" "For existing programs which assume that @code{char} is signed or unsigned, " "GCC provides the options @option{-fsigned-char} and @option{-funsigned-char} " "to set the default type of @code{char}. Using these options, the example " "code above compiles cleanly with @option{-Wall -W} when @code{char} is " "unsigned:" msgstr "" "Para los programas existentes que asuman que @code{char} es con signo\n" "o sin signo, GCC suministra las opciones @option{-fsigned-char} y\n" "@option{-funsigned-char} para poner el tipo @code{char} por\n" "defecto. Usando estas opciones, el c@'odigo de ejemplo anterior\n" "compila limpiamente cuando @code{char} es sin signo:" #. type: cindex #, no-wrap msgid "@option{-funsigned-char} option" msgstr "@option{-funsigned-char}, opci@'on" #. type: cindex #, no-wrap msgid "@option{-fsigned-char} option" msgstr "@option{-fsigned-char}, opci@'on" #. type: example #, fuzzy, no-wrap msgid "" "$ gcc -Wall -W -funsigned-char signed.c \n" "$ ./a.out \n" "char is unsigned (c = 255)\n" msgstr "" "$ gcc -Wall -funsigned-char signed.es.c\n" "$ ./a.out\n" "el car@'acter no tiene signo (c = 255)" #. type: Plain text #, fuzzy msgid "" "However, when @code{char} is signed the value 255 wraps around to @math{-1}, " "giving a warning when compiled with @option{-Wall -W}:" msgstr "" "Sin embargo, cuando @code{char} es con signo el valor 255 salta hacia\n" "el @math{-1}, dando un aviso:" #. type: example #, fuzzy, no-wrap msgid "" "$ gcc -Wall -W -fsigned-char signed.c \n" "signed.c: In function `main':\n" "signed.c:7: warning: comparison is always false due to \n" " limited range of data type\n" "$ ./a.out \n" "char is signed (c = -1)\n" msgstr "" "$ gcc -Wall -fsigned-char signed.es.c \n" "signed.es.c: In function `main':\n" "signed.es.c:7: warning: comparison is always false due\n" " to limited range of data type\n" "$ ./a.out\n" "el car@'acter tiene signo (c = -1)" #. type: Plain text msgid "" "The warning message @cite{``comparison is always true/false due to limited " "range of data type''} is one symptom of code which assumes a definition of " "@code{char} which is different from the actual type." msgstr "" "El mensaje de aviso @cite{``comparison es always true/false due to\n" "limited range of data type''} es un s@'{@dotless{i}}ntoma de que el\n" "c@'odigo asume una definici@'on de @code{char} que difiere del tipo actual." #. type: Plain text msgid "" "The most common problem with code written assuming signed @code{char} types " "occurs with the functions @code{getc}, @code{fgetc} and @code{getchar} " "(which read a character from a file). They have a return type of @code" "{int}, not @code{char}, and this allows them to use the special value @math" "{-1} (defined as @code{EOF}) to indicate an end-of-file error. " "Unfortunately, many programs have been written which incorrectly store this " "return value straight into a @code{char} variable. Here is a typical " "example:" msgstr "" "El problema m@'as com@'un en la escritura de c@'odigo asumiendo el\n" "tipo @code{char} con signo ocurre con las funciones @code{getc},\n" "@code{fgetc} y @code{getchar} (las cuales leen caract@'eres de un\n" "archivo). Tienen un tipo de retorno de @code{int}, no @code{char}, y\n" "esto permite el uso de un valor especial @math{-1} (definido como\n" "@code{EOF}) para indicar un error de final de\n" "archivo. Desafortunadamente, muchos programas han sido escritos\n" "guardando incorrectamente este valor de retorno directamente en una\n" "variable @code{char}. Aqu@'{@dotless{i}} est@'a el\n" "t@'{@dotless{i}}pico ejemplo:" #. type: example #, no-wrap msgid "@verbatiminclude testgetc.c\n" msgstr "@verbatiminclude testgetc.es.c\n" #. type: Plain text msgid "" "This only works on platforms which default to a signed @code{char} type." "@footnote{There is also a subtle error even on platforms with signed @code" "{char}---the @sc{ascii} character 255 is spuriously interpreted as an end of " "file condition.} On platforms which use an unsigned @code{char} the same " "code will fail, because the value @math{-1} becomes 255 when stored in an " "@code{unsigned char}. This usually causes an infinite loop because the end " "of the file cannot be recognized.@footnote{If displayed, character code 255 " "often appears as @code{@\"y}.} To be portable, the program should test the " "return value as an integer before coercing it to a @code{char}, as follows:" msgstr "" "Esto s@'olo funciona en plataformas que por defecto tienen el tipo\n" "@code{char} con signo.@footnote{Esto es adem@'as un sutil error en\n" "plataformas con @code{char} con signo ---el car@'acter @sc{ascii} 255\n" "es falsamente interpretado como una condici@'on de final de archivo.}\n" "En plataformas que usan @code{char} sin signo el mismo c@'odigo puede\n" "fallar, porque el valor @math{-1} se convierte en un 255 cuando se\n" "almacena en un @code{unsigned char}. Esto es normalmente causa de\n" "bucles infinitos porque el final del archivo no puede ser\n" "reconocido.@footnote{Si se mostrase, el car@'acter con c@'odigo 255 a\n" "menudo aparece como @code{@'\"y}.} Para ser portable, el programa debe\n" "comprobar el valor de retorno como un entero antes de forzarlo a\n" "@code{char}, como a continuaci@'on:" #. type: example #, no-wrap msgid "@verbatiminclude testgetc2.c\n" msgstr "@verbatiminclude testgetc2.es.c\n" #. type: cindex #, no-wrap msgid "signed bitfield option" msgstr "opci@'on para campos orientados a bit con signo" #. type: cindex #, no-wrap msgid "unsigned bitfield option" msgstr "opci@'on para campos orientados a bit sin signo" #. type: cindex #, no-wrap msgid "bitfields, portability of signed vs unsigned" msgstr "campos orientados a bit, portabilidad con signo versus sin signo" #. type: cindex #, no-wrap msgid "@option{-funsigned-bitfields} option" msgstr "@option{-funsigned-bitfields}, opci@'on" #. type: cindex #, no-wrap msgid "@option{-fsigned-bitfields} option" msgstr "@option{-fsigned-bitfields}, opci@'on" #. type: Plain text msgid "" "The same considerations described in this section apply to the definitions " "of bitfields in structs, which can be signed or unsigned by default. In " "GCC, the default type of bitfields can be controlled using the options " "@option{-fsigned-bitfields} and @option{-funsigned-bitfields}." msgstr "" "Las mismas consideraciones de esta secci@'on se aplican a las\n" "definiciones de campos orientados a bit en estructuras, las cuales\n" "pueden ser por defecto con signo o sin signo. En GCC, el tipo por\n" "defecto para los campos orientados a bit puede ser controlado usando\n" "las opciones @option{-fsigned-bitfields} y\n" "@option{-funsigned-bitfields}." #. type: cindex #, no-wrap msgid "troubleshooting options" msgstr "opciones de resoluci@'on de problemas" #. type: cindex #, no-wrap msgid "help options" msgstr "opciones de ayuda" #. type: cindex #, no-wrap msgid "command-line help option" msgstr "opci@'on de ayuda en l@'{@dotless{i}}nea de comandos" #. type: Plain text msgid "" "GCC provides several help and diagnostic options to assist in " "troubleshooting problems with the compilation process. All the options " "described in this chapter work with both @code{gcc} and @code{g++}." msgstr "" "GCC proporciona varias opciones de ayuda para ayudar en la\n" "resoluci@'on de problemas con el proceso de compilaci@'on. Todas las\n" "opciones descritas en este cap@'{@dotless{i}}tulo funciona tanto con\n" "@code{gcc} como con @code{g++}." #. type: section #, no-wrap msgid "Help for command-line options" msgstr "Opciones de ayuda en l@'{@dotless{i}}nea de comandos" #. type: section #, no-wrap msgid "Version numbers" msgstr "N@'umeros de versi@'on" #. type: section #, no-wrap msgid "Verbose compilation" msgstr "Compilaci@'on verbosa" #. type: section #, no-wrap msgid "Stopping a program in an infinite loop" msgstr "Parando un programa en un bucle infinito" #. type: section #, no-wrap msgid "Preventing excessive memory usage" msgstr "Previniendo un uso excesivo de memoria" #. type: cindex #, no-wrap msgid "@option{--help} option, display command-line options" msgstr "@option{--help}, opci@'on para mostrar las opciones de l@'{@dotless{i}}nea de comandos" #. type: Plain text msgid "" "To obtain a brief reminder of various command-line options, GCC provides a " "help option which displays a summary of the top-level GCC command-line " "options:" msgstr "" "Para tener un breve recordatorio de varias opciones del comando, GCC\n" "tiene una opci@'on de ayuda que muestra un resumen de alto nivel\n" "de las opciones del comando GCC:" #. type: example #, no-wrap msgid "$ gcc --help\n" msgstr "$ gcc --help\n" #. type: cindex #, no-wrap msgid "verbose help option" msgstr "opci@'on de ayuda verbosa" #. type: cindex #, no-wrap msgid "@option{-v} option, verbose compilation" msgstr "@option{-v}, opci@'on para compilaci@'on verbosa" #. type: cindex #, no-wrap msgid "@option{v} option, verbose compilation" msgstr "@option{v}, opci@'on para compilaci@'on verbosa" #. type: Plain text msgid "" "To display a complete list of options for @code{gcc} and its associated " "programs, such as the GNU Linker and GNU Assembler, use the help option " "above with the verbose (@option{-v}) option:" msgstr "" "Para mostrar una lista completa de opciones para @code{gcc} y sus\n" "programas asociados, tales como el Enlazador de GNU y el Ensamblador\n" "de GNU, usa la opci@'on de arriba con la opci@'on verbosa\n" "(@option{-v}:" #. type: example #, no-wrap msgid "$ gcc -v --help\n" msgstr "$ gcc -v --help\n" #. type: Plain text msgid "" "The complete list of options produced by this command is extremely long---" "you may wish to page through it using the @code{more} command, or redirect " "the output to a file for reference:" msgstr "" "La lista completa de opciones producidas por este comando es\n" "extremadamente larga ---se puede desear paginar a trav@'es de @'esta\n" "usando el comando @code{more}, o redirigir la salida a un fichero por\n" "referencia: " #. type: example #, no-wrap msgid "$ gcc -v --help 2>&1 | more\n" msgstr "$ gcc -v --help 2>&1 | more\n" #. type: Plain text msgid "You can find the version number of @code{gcc} using the version option:" msgstr "" "Se puede encontrar el n@'umero de versi@'on de @code{gcc} usando la\n" "opci@'on de versi@'on" #. type: cindex #, no-wrap msgid "version number of GCC, displaying" msgstr "n@'umero de versi@'on de GCC, mostrando" #. type: cindex #, no-wrap msgid "@option{--version} option, display version number" msgstr "@code{--version}, opci@'on para mostrar el n@'umero de versi@'on" #. type: example #, fuzzy, no-wrap msgid "" "$ gcc --version\n" "gcc (Debian 4.6.1-4) 4.6.1\n" msgstr "" "$ gcc --version\n" "gcc (GCC) 3.3.1\n" #. type: Plain text msgid "" "The version number is important when investigating compilation problems, " "since older versions of GCC may be missing some features that a program " "uses. The version number has the form @var{major-version.minor-version} or " "@var{major-version.minor-version.micro-version}, where the additional third " "``micro'' version number (as shown above) is used for subsequent bug-fix " "releases in a release series." msgstr "" "El n@'umero de versi@'on es importante cuando se investigan los\n" "problemas de compilaci@'on debido a que las versiones antiguas de GCC\n" "pueden no tener algunas funcionalidades que un programa usa. El\n" "n@'umero de versi@'on tiene las forma\n" "@var{major-version.minor-version} @'o\n" "@var{major-version.minor-version.micro-version}, d@'onde el tercer\n" "n@'umero de versi@'on ``micro'' (como se muestra arriba) es usado para\n" "la subsiguiente entrega de correcci@'on de errores en una serie de\n" "entregas." #. type: cindex #, no-wrap msgid "major version number, of GCC" msgstr "n@'umero de versi@'on mayor, de GCC" #. type: cindex #, no-wrap msgid "minor version number, of GCC" msgstr "n@'umero de versi@'on menor, de GCC" #. type: cindex #, no-wrap msgid "patch level, of GCC" msgstr "nivel de parche, de GCC" #. type: Plain text msgid "More details about the version can be found using @option{-v}:" msgstr "" "Pueden encontrarse m@'as detalles acerca de la versi@'on usando\n" "@option{-v}:" #. type: example #, no-wrap msgid "" "$ gcc -v\n" "Using built-in specs.\n" "COLLECT_GCC=gcc\n" "COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/\n" " /i486-linux-gnu/4.6.1/lto-wrapper\n" "Target: i486-linux-gnu\n" "Configured with: ../src/configure -v \n" "--with-pkgversion='Debian 4.6.1-4' \n" "--with-bugurl=file:///usr/share/doc/gcc-4.6/\n" " /README.Bugs \n" "--enable-languages=c,c++,fortran,objc,obj-c++,go \n" "--prefix=/usr --program-suffix=-4.6 \n" "--enable-shared --enable-multiarch \n" "--with-multiarch-defaults=i386-linux-gnu \n" "--enable-linker-build-id --with-system-zlib \n" "--libexecdir=/usr/lib/i386-linux-gnu \n" "--without-included-gettext --enable-threads=posix \n" "--with-gxx-include-dir=/usr/include/c++/4.6 \n" "--libdir=/usr/lib/i386-linux-gnu --enable-nls \n" "--enable-clocale=gnu --enable-libstdcxx-debug \n" "--enable-libstdcxx-time=yes --enable-plugin \n" "--enable-objc-gc --enable-targets=all \n" "--with-arch-32=i586 --with-tune=generic \n" "--enable-checking=release --build=i486-linux-gnu \n" "--host=i486-linux-gnu --target=i486-linux-gnu \n" "Thread model: posix\n" "gcc version 4.6.1 (Debian 4.6.1-4) \n" msgstr "" "$ gcc -v\n" "Using built-in specs.\n" "COLLECT_GCC=gcc\n" "COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/\n" " /i486-linux-gnu/4.6.1/lto-wrapper\n" "Target: i486-linux-gnu\n" "Configured with: ../src/configure -v \n" "--with-pkgversion='Debian 4.6.1-4' \n" "--with-bugurl=file:///usr/share/doc/gcc-4.6/\n" " /README.Bugs \n" "--enable-languages=c,c++,fortran,objc,obj-c++,go \n" "--prefix=/usr --program-suffix=-4.6 \n" "--enable-shared --enable-multiarch \n" "--with-multiarch-defaults=i386-linux-gnu \n" "--enable-linker-build-id --with-system-zlib \n" "--libexecdir=/usr/lib/i386-linux-gnu \n" "--without-included-gettext --enable-threads=posix \n" "--with-gxx-include-dir=/usr/include/c++/4.6 \n" "--libdir=/usr/lib/i386-linux-gnu --enable-nls \n" "--enable-clocale=gnu --enable-libstdcxx-debug \n" "--enable-libstdcxx-time=yes --enable-plugin \n" "--enable-objc-gc --enable-targets=all \n" "--with-arch-32=i586 --with-tune=generic \n" "--enable-checking=release --build=i486-linux-gnu \n" "--host=i486-linux-gnu --target=i486-linux-gnu \n" "Thread model: posix\n" "gcc version 4.6.1 (Debian 4.6.1-4) \n" #. type: cindex #, no-wrap msgid "configuration files for GCC" msgstr "archivos de configuraci@'on de GCC" #. type: cindex #, no-wrap msgid "@code{specs} directory, compiler configuration files" msgstr "@code{specs}, directorio de archivos de configuraci@'on del compilador" #. type: Plain text msgid "" "This includes information on the build flags of the compiler itself and the " "installed configuration file, @file{specs}." msgstr "" "Incluye informaci@'on en los flags de construcci@'on al mismo\n" "compilador y al archivo de configuraci@'on instalado, @file{specs}." #. type: cindex #, no-wrap msgid "verbose compilation, @option{-v} option" msgstr "compilaci@'on verbosa, opci@'on @option{-v}" #. type: Plain text msgid "" "The @option{-v} option can also be used to display detailed information " "about the exact sequence of commands used to compile and link a program. " "Here is an example which shows the verbose compilation of the @cite{Hello " "World} program:" msgstr "" "La opci@'on @option{-v} tambi@'en puede ser usada para mostrar\n" "informaci@'on detallada acerca de la secuencia exacta de comandos\n" "usados para compilar y enlazar un programa. Aqu@'{@dotless{i}} hay un\n" "ejemplo que muestra la compilaci@'on verbosa del programa @cite{Hola\n" "Mundo}:" #. type: example #, no-wrap msgid "" "$ gcc -v -Wall hello.c Using built-in specs.\n" "COLLECT_GCC=gcc\n" "COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/\n" " /i486-linux-gnu/4.6.1/lto-wrapper\n" "Target: i486-linux-gnu \n" "Configured with: ../src/configure\n" "-v --with-pkgversion='Debian 4.6.1-4'\n" "--with-bugurl=file:///usr/share/doc/gcc-4.6/\n" " /README.Bugs\n" "--enable-la nguages=c,c++,fortran,objc,obj-c++,go\n" "--prefix=/usr --program-suffix=-4.6 --enable-shared\n" "--enable-multiarch \n" "--with-multiarch-defaults=i386-linux-gnu \n" "--enable-linker-build-id --with-system-zlib\n" "--libexecdir=/usr/lib/i386-linux-gnu\n" "--without-included-gettext --enable-threads=posix\n" "--with-gxx-include-dir=/usr/include/c++/4.6\n" "--libdir=/usr/lib/i386-linux-gnu --enable-nls\n" "--enable-clocale=gnu --enable-libstdcxx-debug\n" "--enable-libstdcxx-time=yes --enable-plugin\n" "--enable-objc-gc --enable-targets=all\n" "--with-arch-32=i586 --with-tune=generic\n" "--enable-checking =release --build=i486-linux-gnu\n" "--host=i486-linux-gnu --target=i486-linux-gnu \n" "Thread model: posix gcc version 4.6.1 \n" " (Debian 4.6.1-4)\n" "COLLECT_GCC_OPTIONS='-v' '-Wall' '-mtune=generic'\n" "'-march=i586'\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/cc1\n" "-quiet -v hello.c -quiet -dumpbase hello.c\n" "-mtune=generic -march=i586 -auxbase hello -Wall -version\n" "-o /tmp/cchpM0t3.s \n" "GNU C (Debian 4.6.1-4) version 4.6.1\n" "(i486-linux-gnu) compiled by GNU C version 4.6.1, GMP\n" "version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9\n" "warning: GMP header version 5.0.1 differs from library\n" "version 5.0.2. \n" "GGC heuristics: --param ggc-min-expand=46 \n" "--param ggc-min-heapsize=31802\n" "ignoring nonexistent directory\n" "\"/usr/local/include/i386-linux-gnu\" \n" "ignoring nonexistent directory\n" "\"/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/../\n" " /../../../../i486-linux-gnu/include\"\n" "#include \"...\" search starts here: \n" "#include <...> search starts here:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/include\n" "/usr/local/include\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /include-fixed\n" "/usr/include/i386-linux-gnu /usr/include \n" "End of searchlist. \n" "GNU C (Debian 4.6.1-4) version 4.6.1\n" "(i486-linux-gnu) compiled by GNU C version 4.6.1, GMP\n" "version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9\n" "warning: GMP header version 5.0.1 differs from library\n" "version 5.0.2. \n" "GGC heuristics: --param ggc-min-expand=46 \n" "--param ggc-min-heapsize=31802\n" "Compiler executable checksum:\n" "2cfae8623c84fd817bfff483158c4341\n" "COLLECT_GCC_OPTIONS='-v' '-Wall' '-mtune=generic'\n" "'-march=i586' as --32 -o /tmp/ccQxW8a5.o /tmp/cchpM0t3.s\n" "COMPILER_PATH=/usr/lib/i386-linux-gnu/gcc/\n" " /i486-linux-gnu/4.6.1/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/\n" "LIBRARY_PATH=/usr/lib/i386-linux-gnu/gcc/\n" " /i486-linux-gnu/4.6.1/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../../:\n" "/lib/:/usr/lib/:/usr/lib/i386-linux-gnu/ \n" "COLLECT_GCC_OPTIONS='-v' '-Wall' '-mtune=generic'\n" "'-march=i586'\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /collect2\n" "--build-id --no-add-needed --eh-frame-hdr -m elf_i386\n" "--hash-style=both -dynamic -linker /lib/ld-linux.so.2\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../../crt1.o\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../../crti.o\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /crtbegin.o\n" "-L/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1\n" "-L/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../.. \n" "-L/usr/lib/i386-linux-gnu/tmp/ccQxW8a5.o \n" "-lgcc --as-needed -lgcc_s --no-as-needed\n" "-lc -l gcc --as-needed -lgcc_s --no-as-needed\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /crtend.o\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../../crtn.o \n" msgstr "" "$ gcc -v -Wall hola.es.c Using built-in specs.\n" "COLLECT_GCC=gcc\n" "COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/\n" " /i486-linux-gnu/4.6.1/lto-wrapper\n" "Target: i486-linux-gnu \n" "Configured with: ../src/configure\n" "-v --with-pkgversion='Debian 4.6.1-4'\n" "--with-bugurl=file:///usr/share/doc/gcc-4.6/\n" " /README.Bugs\n" "--enable-la nguages=c,c++,fortran,objc,obj-c++,go\n" "--prefix=/usr --program-suffix=-4.6 --enable-shared\n" "--enable-multiarch \n" "--with-multiarch-defaults=i386-linux-gnu \n" "--enable-linker-build-id --with-system-zlib\n" "--libexecdir=/usr/lib/i386-linux-gnu\n" "--without-included-gettext --enable-threads=posix\n" "--with-gxx-include-dir=/usr/include/c++/4.6\n" "--libdir=/usr/lib/i386-linux-gnu --enable-nls\n" "--enable-clocale=gnu --enable-libstdcxx-debug\n" "--enable-libstdcxx-time=yes --enable-plugin\n" "--enable-objc-gc --enable-targets=all\n" "--with-arch-32=i586 --with-tune=generic\n" "--enable-checking =release --build=i486-linux-gnu\n" "--host=i486-linux-gnu --target=i486-linux-gnu \n" "Thread model: posix gcc version 4.6.1 \n" " (Debian 4.6.1-4)\n" "COLLECT_GCC_OPTIONS='-v' '-Wall' '-mtune=generic'\n" "'-march=i586'\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/cc1\n" "-quiet -v hola.es.c -quiet -dumpbase hola.es.c\n" "-mtune=generic -march=i586 -auxbase hola.es -Wall -version\n" "-o /tmp/cchpM0t3.s \n" "GNU C (Debian 4.6.1-4) version 4.6.1\n" "(i486-linux-gnu) compiled by GNU C version 4.6.1, GMP\n" "version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9\n" "warning: GMP header version 5.0.1 differs from library\n" "version 5.0.2. \n" "GGC heuristics: --param ggc-min-expand=46 \n" "--param ggc-min-heapsize=31802\n" "ignoring nonexistent directory\n" "\"/usr/local/include/i386-linux-gnu\" \n" "ignoring nonexistent directory\n" "\"/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/../\n" " /../../../../i486-linux-gnu/include\"\n" "#include \"...\" search starts here: \n" "#include <...> search starts here:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/include\n" "/usr/local/include\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /include-fixed\n" "/usr/include/i386-linux-gnu /usr/include \n" "End of searchlist. \n" "GNU C (Debian 4.6.1-4) version 4.6.1\n" "(i486-linux-gnu) compiled by GNU C version 4.6.1, GMP\n" "version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9\n" "warning: GMP header version 5.0.1 differs from library\n" "version 5.0.2. \n" "GGC heuristics: --param ggc-min-expand=46 \n" "--param ggc-min-heapsize=31802\n" "Compiler executable checksum:\n" "2cfae8623c84fd817bfff483158c4341\n" "COLLECT_GCC_OPTIONS='-v' '-Wall' '-mtune=generic'\n" "'-march=i586' as --32 -o /tmp/ccQxW8a5.o /tmp/cchpM0t3.s\n" "COMPILER_PATH=/usr/lib/i386-linux-gnu/gcc/\n" " /i486-linux-gnu/4.6.1/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/\n" "LIBRARY_PATH=/usr/lib/i386-linux-gnu/gcc/\n" " /i486-linux-gnu/4.6.1/:\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../../:\n" "/lib/:/usr/lib/:/usr/lib/i386-linux-gnu/ \n" "COLLECT_GCC_OPTIONS='-v' '-Wall' '-mtune=generic'\n" "'-march=i586'\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /collect2\n" "--build-id --no-add-needed --eh-frame-hdr -m elf_i386\n" "--hash-style=both -dynamic -linker /lib/ld-linux.so.2\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../../crt1.o\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../../crti.o\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /crtbegin.o\n" "-L/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1\n" "-L/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../.. \n" "-L/usr/lib/i386-linux-gnu/tmp/ccQxW8a5.o \n" "-lgcc --as-needed -lgcc_s --no-as-needed\n" "-lc -l gcc --as-needed -lgcc_s --no-as-needed\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /crtend.o\n" "/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/\n" " /../../../crtn.o \n" #. type: Plain text msgid "" "The output produced by @option{-v} can be useful whenever there is a problem " "with the compilation process itself. It displays the full directory paths " "used to search for header files and libraries, the predefined preprocessor " "symbols, and the object files and libraries used for linking." msgstr "" "La salida producida por @option{-v} puede ser @'util siempre y cuando\n" "haya un problema con el proceso de compilaci@'on en\n" "s@'{@dotless{i}}. Esto muestra las rutas completas usadas para buscar\n" "los ficheros de cabecera y librer@'{@dotless{i}}as, los\n" "s@'{@dotless{i}}mbolos de preprocesador predefinidos, y los ficheros\n" "objeto y librer@'{@dotless{i}}as usadas para enlazar." #. type: cindex #, no-wrap msgid "infinite loop, stopping" msgstr "bucle infinito, parando" #. type: cindex #, no-wrap msgid "control-C, interrupt" msgstr "control-C, interrumpir" #. type: cindex #, no-wrap msgid "SIGINT signal" msgstr "se@~nal SIGINT" #. type: cindex #, no-wrap msgid "@code{attach}, debug running program" msgstr "@code{attach}, depuraci@'on de un programa en ejecuci@'on" #. type: Plain text msgid "" "A program which goes into an infinite loop or ``hangs'' can be difficult to " "debug. On most systems a foreground process can be stopped by hitting @kbd" "{Control-C}, which sends it an interrupt signal (@sc{sigint}). However, " "this does not help in debugging the problem---the @sc{sigint} signal " "terminates the process without producing a core dump. A more sophisticated " "approach is to @dfn{attach} to the running process with a debugger and " "inspect it interactively." msgstr "" "Un programa que se mete en un bucle infinito o se ``cuelga'' puede\n" "ser dif@'{@dotless{i}}cil de depurar. En la mayor@'{@dotless{i}}a de\n" "los sistemas un proceso en primer plano puede ser detenido pulsando\n" "@kbd{Control-C}, que env@'{@dotless{i}}a una se@~nal de interrupci@'on\n" "(@sc{sigint}). Sin embargo, esto no ayuda en la depuraci@'on del\n" "problema ---la se@~nal @sc{sigint} termina el proceso sin producir un\n" "core dump. Un enfoque m@'as sofisticado es @dfn{adjuntar} el proceso\n" "en ejecuci@'on a un depurador e inspeccionarlo de manera interactiva. " #. type: Plain text msgid "For example, here is a simple program with an infinite loop:" msgstr "" "Por ejemplo, aqu@'{@dotless{i}} hay un programa simple con un bucle\n" "infinito: " #. type: example #, no-wrap msgid "@verbatiminclude loop.c\n" msgstr "@verbatiminclude bucle.es.c\n" #. type: Plain text msgid "" "In order to attach to the program and debug it, the code should be compiled " "with the debugging option @option{-g}:" msgstr "" "Para adjuntar el programa y depurarlo, el c@'odigo\n" "deber@'{@dotless{i}}a ser compilado con la opci@'on de depuraci@'on\n" "@option{-g}:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -g loop.c\n" "$ ./a.out\n" "@r{(program hangs)}\n" msgstr "" "$ gcc -Wall -g loop.es.c\n" "$ ./a.out\n" "@r{(program hangs)}\n" #. type: cindex #, no-wrap msgid "process id, finding" msgstr "identificador de proceso, encontrando" #. type: Plain text msgid "" "Once the executable is running we need to find its process id (@sc{pid}). " "This can be done from another session with the command @code{ps x}:" msgstr "" "Una vez el ejecutable est@'a ejecut@'andose, se necesitar@'a encontrar\n" "su identificador de proceso (@sc{pid}). Esto se puede hacer desde otra\n" "sesi@'on con el comando @code{ps x}:" #. type: example #, no-wrap msgid "" "$ ps x\n" "PID TTY STAT TIME COMMAND\n" "... ..... .. .... \n" "2333 pts/0 R+ 0:16 ./a.out\n" "\n" msgstr "" "$ ps x\n" "PID TTY STAT TIME COMMAND\n" "... ..... .. .... \n" "2333 pts/0 R+ 0:16 ./a.out\n" "\n" #. type: Plain text msgid "" "In this case the process id is 2333, and we can now attach to it with @code" "{gdb}. The debugger should be started in the directory containing the " "executable and its source code:@footnote{Alternatively, the appropriate " "paths can be set up in @code{gdb} using the @code{file} and @code{directory} " "commands.}" msgstr "" "En este caso el identificador de proceso es 2333, y ahora se puede\n" "adjuntar con @code{gdb}. El depurador deber@'{@dotless{i}}a ser\n" "iniciado en el directorio que contiene el ejecutable y su c@'odigo\n" "fuente:@footnote{De manera alternativa, las rutas apropiadas pueden\n" "ser configuradas en @code{gdb} usando los comandos @code{file} y\n" "@code{directory}.}" #. type: example #, fuzzy, no-wrap #| msgid "" #| "$ gdb a.out\n" #| "GNU gdb (GDB) 7.3-debian\n" #| "...\n" #| "(gdb) attach 2333\n" #| "Attaching to program: a.out, process 2333\n" #| "Reading symbols from\n" #| "/lib/i386-linux-gnu/i686/cmov/libc.so.6...(no\n" #| "debugging symbols found)...done.\n" #| "Loaded symbols for\n" #| "/lib/i386-linux-gnu/i686/cmov/libc.so.6\n" #| "Reading symbols from /lib/ld-linux.so.2...(no debugging\n" #| "symbols found)...done.\n" #| "Loaded symbols for /lib/ld-linux.so.2\n" #| "0x080483c5 in main () at loop.c:5\n" #| "5 while (1) { i++; };\n" #| "(gdb) \n" msgid "" "$ gdb a.out\n" "GNU gdb (GDB) 7.3-debian\n" "...\n" "(gdb) attach 2333\n" "Attaching to program: a.out, process 2333\n" "Reading symbols from\n" "/lib/i386-linux-gnu/i686/cmov/libc.so.6...(no\n" "debugging symbols found)...done.\n" "Loaded symbols for\n" "/lib/i386-linux-gnu/i686/cmov/libc.so.6\n" "Reading symbols from /lib/ld-linux.so.2...(no debugging\n" "symbols found)...done.\n" "Loaded symbols for /lib/ld-linux.so.2\n" "0x080483c5 in main () at loop.c:5\n" "5 while (1) @{ i++; @};\n" "(gdb) \n" msgstr "" "$ gdb a.out\n" "GNU gdb (GDB) 7.3-debian\n" "...\n" "(gdb) attach 2333\n" "Attaching to program: a.out, process 2333\n" "Reading symbols from\n" "/lib/i386-linux-gnu/i686/cmov/libc.so.6...(no\n" "debugging symbols found)...done.\n" "Loaded symbols for\n" "/lib/i386-linux-gnu/i686/cmov/libc.so.6\n" "Reading symbols from /lib/ld-linux.so.2...(no debugging\n" "symbols found)...done.\n" "Loaded symbols for /lib/ld-linux.so.2\n" "0x080483c5 in main () at loop.c:5\n" "5 while (1) { i++; };\n" "(gdb) \n" #. type: Plain text msgid "" "The output shows the line that was about to execute at the point when the " "debugger attached to the process. The attached program is paused but still " "``live''---it can be examined interactively and continued or terminated " "(with the @code{kill} command) if necessary:" msgstr "" "La salida muestra la l@'{@dotless{i}}nea que se ejecut@'o en el punto\n" "en el que el depurador se adjunt@'o al proceso. El programa adjunto se\n" "pausa pero todav@'{@dotless{i}}a `vive' ---este puede examinado\n" "interactivamente y contin@'ua o termina (con el comando @code{kill})\n" "si es necesario: " #. type: example #, no-wrap msgid "" "(gdb) print i\n" "$1 = 1960534048\n" "(gdb) kill\n" "Kill the program being debugged? (y or n) y\n" "(gdb) \n" msgstr "" "(gdb) print i\n" "$1 = 1960534048\n" "(gdb) kill\n" "Kill the program being debugged? (y or n) y\n" "(gdb) \n" #. type: cindex #, no-wrap msgid "SIGQUIT signal" msgstr "se@'nal SIGQUIT" #. type: Plain text msgid "" "If you want to stop a process immediately and create a core dump, the shell " "command @code{kill -3 @var{pid}} (where @var{pid} is the process id) will " "send it a @sc{sigquit} signal. The @sc{sigquit} signal does trigger a core " "dump, unlike @sc{sigint}. Note that if core dumps were disabled when the " "process was started, no core file will be produced (@pxref{Examining core " "files})." msgstr "" "Si se quiere parar un proceso inmediatamente y crear un core dump, el\n" "comando de shell @code{kill -3 @var{pid}} (d@'onde @var{pid} es el\n" "identificador de proceso) enviar@'a una se@~nal @sc{sigquit}. La\n" "se@~nal @sc{sigquit} dispara un core dump, no como\n" "@sc{sigint}. N@'otese que si los core dump fueran deshabilitados\n" "cuando el proceso fu@'e iniciado, ning@'un fichero core se producir@'a\n" "(@pxref{Examinando archivos core})." #. type: cindex #, no-wrap msgid "memory usage, limiting" msgstr "uso de memoria, limitando" #. type: cindex #, no-wrap msgid "virtual memory usage, limiting" msgstr "uso de memoria virtual, limitando" #. type: Plain text msgid "" "Sometimes a programming error will cause a process to allocate huge amounts " "of memory, consuming all the @sc{ram} on a system. To prevent this, the GNU " "Bash command @command{ulimit -v @var{limit}} can be used to restrict the " "amount of virtual memory available to each process. The limit is measured " "in kilobytes and applies to new processes started in the current shell. For " "example," msgstr "" "Algunas veces un error de programaci@'on har@'a que un proceso\n" "gestione grandes cantidades de memoria, consumiendo toda la @sc{ram}\n" "en un sistema. Para prevenir esto, el comando GNU Bash @command{ulimit\n" "-v @var{limit}} se puede usar para restringir la cantidad de memoria\n" "virtual disponible en cada proceso. El l@'{@dotless{i}}mite es medido\n" "en kilobytes y se aplica a nuevos procesos iniciados en la shell\n" "actual. Por ejemplo," #. type: example #, no-wrap msgid "$ ulimit -v 4096\n" msgstr "$ ulimit -v 4096\n" #. type: Plain text msgid "" "will limit subsequent processes to 4 megabytes of virtual memory (4096k). " "By default the limit cannot be increased in the same session once it has " "been applied, so it is best to start a separate shell for reduced @code" "{ulimit} operations. Alternatively, you can set a @dfn{soft limit} (which " "can be undone) with the options @option{-S -v}." msgstr "" "limitar@'a los siguientes procesos a 4 megabytes de memoria virtual\n" "(4096k). Por defecto el l@'{@dotless{i}}mite no puede incrementarse en\n" "la misma sesi@'on una vez ha sido establecido, as@'{@dotless{i}} es\n" "mejor comenzar una shell distinta para operaciones @code{ulimit}\n" "reducidas. De manera alternativa, se puede establecer un\n" "@dfn{l@'{@dotless{i}}mite blando} (que puede ser deshecho) con las\n" "opciones @option{-S -v}." #. type: Plain text msgid "" "In addition to preventing run-away processes, limiting the amount of memory " "a program is allowed to allocate also provides a way to test how robustly " "@dfn{out of memory} conditions are handled. An artificially low limit can " "be used to simulate running out of memory---a well-written program should " "not crash in this case." msgstr "" "Adicionalmente para prevenir derroche de procesos, limitando la\n" "cantidad de memoria que un programa puede reservar permite una forma\n" "de comprobar la robusted del manejo de condiciones @dfn{out of\n" "memory}. Un artificial l@'{@dotless{i}}mite bajo se puede usar para\n" "simular ejecuciones fuera de memoria ---un programa bien escrito no\n" "debe fallar en estos casos." #. type: Plain text msgid "" "The @command{ulimit} command supports other options including @option{-p}, " "which restricts the number of child processes that can be created, and " "@option{-t}, which places a limit on the number of @sc{cpu} seconds that a " "process can run for. The complete list of settings can be shown with the " "command @code{ulimit -a}. To display more information about the @code" "{ulimit} command, type @code{help ulimit} at the Bash prompt." msgstr "" "El comando @command{ulimit} soporta otras opciones incluyendo\n" "@option{-p}, que restringe el n@'umero de procesos hijos que pueden\n" "ser creados, y @option{-t}, que establece un l@'{@dotless{i}}mite en\n" "el n@'umero de segundos de @sc{cpu} en el que un proceso puede\n" "ejecutarse. La lista completa de configuraciones puede mostrarse con\n" "el comando @code{ulimit -a}. Para mostrar m@'as informaci@'on acerca\n" "del comando @code{ulimit}, escribe @code{help ulimit} en una Shell de\n" "Bash." #. type: cindex #, no-wrap msgid "compiler-related tools" msgstr "utilidades relativas al compilador" #. type: cindex #, no-wrap msgid "tools, compiler-related" msgstr "utilidades, relativas al compilador" #. type: Plain text msgid "" "This chapter describes a number of tools which are useful in combination " "with GCC. These include the GNU archiver @code{ar}, for creating libraries, " "and the GNU profiling and coverage testing programs, @code{gprof} and @code" "{gcov}." msgstr "" "Este cap@'{@dotless{i}}tulo describe un conjunto de herramientas que\n" "son muy utilizadas junto a GCC. Estas incluyen el archivador GNU\n" "@code{ar}, para crear librer@'{@dotless{i}}as, y los programas de\n" "comprobaci@'on de perfil y cobertura, @code{gprof} y @code{gcov}." #. type: section #, no-wrap msgid "Creating a library with the GNU archiver" msgstr "Creando una librer@'{@dotless{i}}a con el archivador de GNU" #. type: node #, no-wrap msgid "Using the profiler gprof" msgstr "Usando el profiler gprof" #. type: node #, no-wrap msgid "Coverage testing with gcov" msgstr "Coverage testing with gcov" #. type: cindex #, no-wrap msgid "libraries, creating with @code{ar}" msgstr "librer@'{@dotless{i}}as, creando con @code{ar}" #. type: Plain text msgid "" "The GNU archiver @code{ar} combines a collection of object files into a " "single archive file, also known as a @dfn{library}. An archive file is " "simply a convenient way of distributing a large number of related object " "files together (as described earlier in @ref{Linking with external " "libraries})." msgstr "" "El archivador GNU @code{ar} combina una colecci@'on de archivos objeto\n" "en un simple fichero de archivo, conocido tambi@'en como una\n" "@dfn{librer@'{@dotless{i}}a}. Un fichero de archivo es simplemente una\n" "forma conveniente de distribuir un gr@'an n@'umero de archivos objeto\n" "juntos (como se describi@'o anteriormente en @ref{Enlazando con\n" "librer@'{@dotless{i}}as externas})." #. type: Plain text msgid "" "To demonstrate the use of the GNU archiver we will create a small library " "@file{libhello.a} containing two functions @code{hello} and @code{bye}." msgstr "" "Para demostrar el uso del archivador GNU se crear@'a una peque@~na\n" "librer@'{@dotless{i}}a @file{libhola.a} conteniendo dos funciones\n" "@code{hola} y @code{adios}." #. type: Plain text msgid "" "The first object file will be generated from the source code for the @code" "{hello} function, in the file @file{hello_fn.c} seen earlier:" msgstr "" "El primer archivo objeto ser@'a generado desde el c@'odigo fuente de\n" "la funci@'on @code{hola}, en el archivo @file{hola_fn.es.c}:" #. type: Plain text msgid "" "The second object file will be generated from the source file @file{bye_fn." "c}, which contains the new function @code{bye}:" msgstr "" "El segundo archivo objeto ser@'a generado con el archivo fuente\n" "@file{adios_fn.es.c}, que contiene la funci@'on @code{adios}: " #. type: example #, no-wrap msgid "@verbatiminclude bye_fn.c\n" msgstr "@verbatiminclude adios_fn.es.c\n" #. type: Plain text msgid "" "Both functions use the header file @file{hello.h}, now with a prototype for " "the function @code{bye()}:" msgstr "" "Ambas funciones usan el archivo de cabecera @file{hola.es.h}, ahora con\n" "un prototipo para la funci@'on @code{adios()}:" #. type: example #, no-wrap msgid "@verbatiminclude hello.h\n" msgstr "@verbatiminclude hola.es.h\n" #. type: Plain text msgid "" "The source code can be compiled to the object files @file{hello_fn.o} and " "@file{bye_fn.o} using the commands:" msgstr "" "El c@'odigo fuente puede ser compilado a los archivos objeto\n" "@file{hola_fn.o} y @file{adios_fn.o} usando el comando:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -c hello_fn.c\n" "$ gcc -Wall -c bye_fn.c\n" msgstr "" "$ gcc -Wall -c hola_fn.es.c\n" "$ gcc -Wall -c adios_fn.es.c" #. type: cindex #, no-wrap msgid "@option{cr} option, create/replace archive files" msgstr "@option{cr}, opci@'on para crear/reemplazar archivos de librer@'{@dotless{i}}as" #. type: Plain text msgid "" "These object files can be combined into a static library using the following " "command line:" msgstr "" "Estos archivos objeto pueden ser combinados en una\n" "librer@'{@dotless{i}}a usando la siguiente l@'{@dotless{i}}nea de comando:" #. type: example #, no-wrap msgid "$ ar cr libhello.a hello_fn.o bye_fn.o\n" msgstr "$ ar cr libhola.a hola_fn.o adios_fn.o" #. type: Plain text msgid "" "The option @option{cr} stands for ``create and replace''.@footnote{Note that " "@code{ar} does not require a prefix @samp{-} for its options.} If the " "library does not exist, it is first created. If the library already exists, " "any original files in it with the same names are replaced by the new files " "specified on the command line. The first argument @file{libhello.a} is the " "name of the library. The remaining arguments are the names of the object " "files to be copied into the library." msgstr "" "La opci@'on @option{cr} significa ``crear y\n" "reemplazar''.@footnote{Observe que @code{ar} no requiere el prefijo\n" "@samp{-} para estas opciones.} Si la librer@'{@dotless{i}}a no existe,\n" "primero ser@'a creada. Si la librear@'{@dotless{i}}a ya existe, el\n" "archivo original con el mismo nombre ser@'a reemplazado por el nuevo\n" "archivo especificado en la l@'{@dotless{i}}nea de comando. El primer\n" "argumento @file{libhola.a} es el nombre de la\n" "librer@'{@dotless{i}}a. El resto de argumentos son los nombres de los\n" "archivos objeto que ser@'an copiados a la librer@'{@dotless{i}}a." #. type: cindex #, no-wrap msgid "@option{t} option, archive table of contents" msgstr "@option{t}, opci@'on para ver la tabla de contenidos de una librer@'{@dotless{i}}a" #. type: cindex #, no-wrap msgid "table of contents, in @code{ar} archive" msgstr "tabla de contenidos, en librer@'{@dotless{i}}as @code{ar}" #. type: Plain text msgid "" "The archiver @code{ar} also provides a ``table of contents'' option @option" "{t} to list the object files in an existing library:" msgstr "" "El archivador @code{ar} adem@'as suministra una opci@'on de ``tabla de\n" "contenidos'' @option{t} para listar los archivos objeto de una\n" "librar@'{@dotless{i}}a existente:" #. type: example #, no-wrap msgid "" "$ ar t libhello.a\n" "hello_fn.o\n" "bye_fn.o\n" msgstr "" "$ at t libhola.a\n" "hola_fn.o\n" "adios_fn.o" #. type: Plain text msgid "" "Note that when a library is distributed, the header files for the public " "functions and variables it provides should also be made available, so that " "the end-user can include them and obtain the correct prototypes." msgstr "" "Observe que cuando la librer@'{@dotless{i}}a sea distribuida, los\n" "archivos cabecera de las funciones y variables p@'ublicas ser@'a\n" "suministrado para que tambi@'en est@'e disponible, as@'{@dotless{i}}\n" "el usuario final puede incluirlos y obtener los prototipos correctos." #. type: Plain text msgid "" "We can now write a program using the functions in the newly created library:" msgstr "" "Se puede escribir ahora un programa usando las funciones de la recien\n" "creada librer@'{@dotless{i}}a:" #. type: example #, no-wrap msgid "@verbatiminclude main3.c\n" msgstr "@verbatiminclude main3.es.c\n" #. type: Plain text msgid "" "This file can be compiled with the following command line, as described in " "@ref{Linking with external libraries}, assuming the library @file{libhello." "a} is stored in the current directory:" msgstr "" "Este archivo puede ser compilado con la siguiente l@'{@dotless{i}}nea\n" "de comando, como est@'a descrito en @ref{Enlazando con\n" "librer@'{@dotless{i}}as externas}, asumiendo que la\n" "librer@'{@dotless{i}}a @file{libhola.a} est@'a almacenada en el\n" "directorio actual:" #. type: example #, fuzzy, no-wrap msgid "$ gcc -Wall main3.c libhello.a -o hello\n" msgstr "$ gcc -Wall main3.es.c libhola.a -o hola" #. type: Plain text msgid "" "The main program is linked against the object files found in the library " "file @file{libhello.a} to produce the final executable." msgstr "" "El programa principal es enlazado junto a los archivos objeto\n" "encontrados en el archivo de librer@'{@dotless{i}}a @file{libhola.a}\n" "para producir el ejecutable final." #. type: Plain text msgid "" "The short-cut library linking option @option{-l} can also be used to link " "the program, without needing to specify the full filename of the library " "explicitly:" msgstr "" "La opci@'on de atajo de enlazado de la librer@'{@dotless{i}}a se puede\n" "usar para enlazar el programa, sin necesidad de especificar\n" "expl@'{@dotless{i}}citamente un camino completo a la librer@'{@dotless{i}}a:" #. type: example #, fuzzy, no-wrap msgid "$ gcc -Wall -L. main3.c -lhello -o hello\n" msgstr "$ gcc -Wall -L. main3.es.c -lhola -o hola" #. type: Plain text msgid "" "The option @option{-L.} is needed to add the current directory to the " "library search path. The resulting executable can be run as usual:" msgstr "" "La opci@'on @option{-L.} es necesaria para a@~nadir el directorio actual\n" "al camino de b@'usqueda de librer@'{@dotless{i}}as. El ejecutable\n" "resultante se puede ejecutar como habitualmente:" #. type: example #, no-wrap msgid "" "$ ./hello\n" "Hello, everyone!\n" "Goodbye!\n" msgstr "" "$ ./hola\n" "@exclamdown{}Hola, cualquiera!\n" "@exclamdown{}Adios!" #. type: Plain text msgid "" "It displays the output from both the @code{hello} and @code{bye} functions " "defined in the library." msgstr "" "Se muestra la salida de ambas funciones @code{hola} y @code{adios}\n" "definidas en la librer@'{@dotless{i}}a." #. type: section #, no-wrap msgid "Using the profiler @code{gprof}" msgstr "Usando el profiler @code{gprof}" #. type: cindex #, no-wrap msgid "profiling, with @code{gprof}" msgstr "profiling, con @code{gprof}" #. type: cindex #, no-wrap msgid "@code{gprof}, GNU Profiler" msgstr "@code{gprof}, GNU Profiler" #. type: Plain text msgid "" "The GNU profiler @code{gprof} is a useful tool for measuring the performance " "of a program---it records the number of calls to each function and the " "amount of time spent there, on a per-function basis. Functions which " "consume a large fraction of the run-time can be identified easily from the " "output of @code{gprof}. Efforts to speed up a program should concentrate " "first on those functions which dominate the total run-time." msgstr "" "El GNU profiler @code{gprof} es una muy usada herramienta para medir\n" "el rendimiento de un programa ---graba el n@'umero de llamadas de cada\n" "funci@'on y contabiliza el tiempo que emplea en ello, en una base por\n" "funci@'on. Las funciones que consumen largas fracciones del tiempo de\n" "ejecuci@'on pueden ser identificas f@'acilmente a partir de la salida\n" "de @code{gprof}. Mejorar la velocidad de un programa requiere primero\n" "concentraci@'on sobre aquellas funciones que dominan el tiempo de\n" "ejecuci@'on completamente." #. type: cindex #, no-wrap msgid "Collatz sequence" msgstr "secuencia de Collatz" #. type: Plain text msgid "" "We will use @code{gprof} to examine the performance of a small numerical " "program which computes the lengths of sequences occurring in the unsolved " "@cite{Collatz conjecture} in mathematics.@footnote{American Mathematical " "Monthly, Volume 92 (1985), 3--23} The Collatz conjecture involves sequences " "defined by the rule:" msgstr "" "Se usar@'a @code{gprof} para examinar el rendimiento de un peque@~no\n" "programa num@'erico que procesar@'a una larga secuencia irresuelta\n" "@cite{Collatz conjeture} en matem@'aticas.@footnote{American\n" "Mathematical Monthly, Volume 92 (1985), 3--23} La conjetura de Gollatz\n" "afecta a secuencias definidas por la regla:" #. type: tex #, no-wrap msgid "" "$$\n" "x_{n+1} \\leftarrow \\cases{ x_n / 2 & if $x_n$ is even\\cr\n" " 3 x_n + 1 & if $x_n$ is odd\\cr}\n" "$$\n" msgstr "" "$$\n" "x_{n+1} \\leftarrow \\cases{ x_n / 2 & si $x_n$ es par\\cr\n" " 3 x_n + 1 & si $x_n$ es impar\\cr}\n" "$$\n" #. type: example #, no-wrap msgid "" "x_@{n+1@} <= x_@{n@} / 2 if x_@{n@} is even\n" " 3 x_@{n@} + 1 if x_@{n@} is odd\n" msgstr "" "x_@{n+1@} <= x_@{n@} / 2 si x_@{n@} es par\n" " 3 x_@{n@} + 1 si x_@{n@} es impar" #. type: Plain text msgid "" "The sequence is iterated from an initial value @math{x_0} until it " "terminates with the value 1. According to the conjecture, all sequences do " "terminate eventually---the program below displays the longest sequences as " "@math{x_0} increases. The source file @file{collatz.c} contains three " "functions: @code{main}, @code{nseq} and @code{step}:" msgstr "" "La secuencia es iterada desde el valor inicial @math{x_0} hasta que\n" "termina con el valor 1. De acuerdo con la conjetura, todas las\n" "secuencias terminar@'an eventualmente ---el programa mostrar@'a las\n" "largas secuencias como incrementos de @math{x_0}. El archivo fuente\n" "@file{collatz.es.c} contiene tres funciones: @code{main}, @code{nseq} y\n" "@code{step}:" #. type: smallexample #, no-wrap msgid "@verbatiminclude collatz.c\n" msgstr "@verbatiminclude collatz.es.c\n" #. type: cindex #, no-wrap msgid "@option{-pg} option, enable profiling" msgstr "@option{-pg}, opci@'on para habilitar profiling" #. type: cindex #, no-wrap msgid "@option{pg} option, enable profiling" msgstr "@option{pg}, opci@'on para habilitar profiling" #. type: cindex #, no-wrap msgid "enable profiling, @option{-pg} option" msgstr "habilitar profiling, opci@'on @option{-pg}" #. type: Plain text msgid "" "To use profiling, the program must be compiled and linked with the @option{-" "pg} profiling option:" msgstr "" "Para usar profiling, el programa debe ser compilado y enlazado con la\n" "opci@'on de profiling @option{-pg}:" #. type: example #, no-wrap msgid "" "$ gcc -Wall -c -pg collatz.c\n" "$ gcc -Wall -pg collatz.o\n" msgstr "" "$ gcc -Wall -c -pg collatz.es.c\n" "$ gcc -Wall -pg collatz.o" #. type: cindex #, no-wrap msgid "instrumented executable, for profiling" msgstr "ejecutable instrumentado, para an@'alisis" #. type: Plain text msgid "" "This creates an @dfn{instrumented} executable which contains additional " "instructions that record the time spent in each function." msgstr "" "Esto crear@'a un ejecutable @dfn{instrumented} que contiene\n" "instrucciones adicionales para registrar el tiempo consumido en cada\n" "funci@'on." #. type: Plain text msgid "" "If the program consists of more than one source file then the @option{-pg} " "option should be used when compiling each source file, and used again when " "linking the object files to create the final executable (as shown above). " "Forgetting to link with the option @option{-pg} is a common error, which " "prevents profiling from recording any useful information." msgstr "" "Si el programa consiste en m@'as de un archivo fuente la opci@'on\n" "@option{-pg} se debe usar cuando se compila cada archivo fuente, y\n" "ser@'a usado en el enlazado de los archivos objetos para crear el\n" "ejecutable final (como se muestra anteriormente). Es un error com@'un\n" "olvidar la opci@'on @option{-pg} en el enlazado, lo cual evita que el\n" "profiling registre mucha informaci@'on @'util. " #. type: Plain text msgid "The executable must be run to create the profiling data:" msgstr "El ejecutable se debe ejecutar para obtener los datos del profiling:" #. type: example #, no-wrap msgid "" "$ ./a.out\n" "@r{(normal program output is displayed)}\n" msgstr "" "$ ./a.out\n" "@r{(la salida normal del programa es mostrada)}" #. type: cindex #, no-wrap msgid "@code{gmon.out}, data file for @code{gprof}" msgstr "@code{gmon.out}, archivo de datos para @code{gprof}" #. type: Plain text msgid "" "While running the instrumented executable, profiling data is silently " "written to a file @file{gmon.out} in the current directory. It can be " "analyzed with @code{gprof} by giving the name of the executable as an " "argument:" msgstr "" "Mientras est@'a corriendo el ejecutable instrumentado, datos de\n" "profiling son silenciosamente escritos en el archivo @file{gmon.out}\n" "en el directorio actual. Puede se analizado con @code{gprof} dando el\n" "nombre del ejecutable como argumento:" #. type: example #, no-wrap msgid "" "$ gprof a.out \n" "Flat profile:\n" "Each sample counts as 0.01 seconds.\n" " % cumul. self self total \n" "time seconds seconds calls us/call us/call name \n" "68.59 2.14 2.14 62135400 0.03 0.03 step\n" "31.09 3.11 0.97 499999 1.94 6.22 nseq\n" " 0.32 3.12 0.01 main\n" msgstr "" "$ gprof a.out\n" "Flat profile:\n" "Each sample counts as 0.01 seconds.\n" " % cumul. self self total\n" "time seconds seconds calls us/call us/call name\n" "68.59 2.14 2.14 62135400 0.03 0.03 step\n" "31.09 3.11 0.97 499999 1.94 6.22 nseq\n" " 0.32 3.12 0.01 main\n" #. type: Plain text msgid "" "The first column of the data shows that the program spends most of its time " "(almost 70%) in the function @code{step}, and 30% in @code{nseq}. " "Consequently efforts to decrease the run-time of the program should " "concentrate on the former. In comparison, the time spent within the @code" "{main} function itself is completely negligible (less than 1%)." msgstr "" "La primera columna de los datos muestra que el programa emplea la\n" "mayor@'{@dotless{i}}a de su tiempo (casi del 70%) en la funci@'on\n" "@code{step}, y el 30% en @code{nseq}. Consecuentes esfuerzos para\n" "decrementar el tiempo de ejecuci@'on debe concentrarse en esta\n" "forma. En comparaci@'on, el tiempo empleado en la funci@'on\n" "@code{main} es completamente imperceptible (menos del 1%)." #. type: Plain text msgid "" "The other columns in the output provide information on the total number of " "function calls made, and the time spent in each function. Additional output " "breaking down the run-time further is also produced by @code{gprof} but not " "shown here. Full details can be found in the manual ``@cite{GNU gprof---The " "GNU Profiler}'', by Jay Fenlason and Richard Stallman." msgstr "" "Las otras columnas de la salida suministran informaci@'on del n@'umero\n" "total de llamadas que son hechas a las funciones, y el tiempo gastado\n" "en cada funci@'on. Informaci@'on adicional del tiempo de ejecuci@'on\n" "se muestra con @code{gprof} pero aqu@'{@dotless{i}} no se muestra. Un\n" "completo detalle se puede encontrar en el manual ``@cite{GNU gprof\n" "---El GNU Profiler}'', de Jay Fenlason y Richard Stallman." #. type: section #, no-wrap msgid "Coverage testing with @code{gcov}" msgstr "Test de cobertura con @code{gcov}" #. type: cindex #, no-wrap msgid "coverage testing, with @code{gcov}" msgstr "test de cobertura, con @code{gcov}" #. type: cindex #, no-wrap msgid "@code{gcov}, GNU coverage testing tool" msgstr "@code{gcov}, GNU coverage testing tool" #. type: Plain text msgid "" "The GNU coverage testing tool @code{gcov} analyses the number of times each " "line of a program is executed during a run. This makes it possible to find " "areas of the code which are not used, or which are not exercised in " "testing. When combined with profiling information from @code{gprof} the " "information from coverage testing allows efforts to speed up a program to be " "concentrated on specific lines of the source code." msgstr "" "La herramienta de test de cobertura GNU @code{gcov} analiza el\n" "n@'umero de veces que cada l@'{@dotless{i}}nea del programa es\n" "ejecutada. Esto permite encontrar @'areas del c@'odigo que no son\n" "usadas, o que no se ejecutan en los tests. Cuando se combinan la\n" "informaci@'on de perfilaci@'on con la informaci@'on de cobertura se\n" "logra aumentar la velocidad de un programa concentr@'andose en\n" "l@'{@dotless{i}}neas espec@'{@dotless{i}}ficas del c@'odigo fuente. " #. type: Plain text msgid "" "We will use the example program below to demonstrate @code{gcov}. This " "program loops overs the integers 1 to 9 and tests their divisibility with " "the modulus (@code{%}) operator." msgstr "" "Se usar@'a el ejemplo siguiente para demostrar @code{gcov}. Este\n" "programa recorre los n@'umeros del 1 al 9 y comprueba su divisibilidad\n" "con el operador m@'odulo (@code{%})." #. type: example #, no-wrap msgid "@verbatiminclude cov.c\n" msgstr "@verbatiminclude cov.es.c\n" #. type: Plain text msgid "" "To enable coverage testing the program must be compiled with the following " "options:" msgstr "" "Para habilitar los test de cobertura el programa debe ser compilado\n" "con las siguientes opciones:" #. type: example #, no-wrap msgid "$ gcc -Wall -fprofile-arcs -ftest-coverage cov.c\n" msgstr "$ gcc -Wall -fprofile-arcs -ftest-coverage cov.es.c" #. type: cindex #, no-wrap msgid "@option{-fprofile-arcs} option, instrument branches" msgstr "@option{-fprofile-arcs}, opci@'on para instrucciones de bifurcaci@'on" #. type: cindex #, no-wrap msgid "@option{fprofile-arcs} option, instrument branches" msgstr "@option{fprofile-arcs}, opci@'on para instrucciones de salto " #. type: cindex #, no-wrap msgid "@option{-ftest-coverage} option, record coverage" msgstr "@option{-ftest-coverage}, opci@'on para registro de cobertura" #. type: cindex #, no-wrap msgid "@option{ftest-coverage} option, record coverage" msgstr "@option{ftest-coverage}, opci@'on para registro de cobertura" #. type: cindex #, no-wrap msgid "instrumented executable, for coverage testing" msgstr "ejecutable instrumentado, para test de cobertura" #. type: cindex #, no-wrap msgid "branches, instrumenting for coverage testing" msgstr "saltos, instrumentando para test de cobertura" #. type: Plain text msgid "" "This creates an @dfn{instrumented} executable which contains additional " "instructions that record the number of times each line of the program is " "executed. The option @option{-ftest-coverage} adds instructions for " "counting the number of times individual lines are executed, while @option{-" "fprofile-arcs} incorporates instrumentation code for each branch of the " "program. Branch instrumentation records how frequently different paths are " "taken through @samp{if} statements and other conditionals. The executable " "must then be run to create the coverage data:" msgstr "" "Esto crear@'a un ejecutable instrumentado que contiene instrucciones\n" "adicionales que registran el n@'umero de veces que cada\n" "l@'{@dotless{i}}nea del programa es ejecutada. La opci@'on\n" "@option{-ftest-coverage} a@~nade instrucciones para contabilizar el\n" "n@'umero de veces que las l@'{@dotless{i}}neas individuales son\n" "ejecutadas, mientras que @option{-fprofile-arcs} incorpora\n" "instrucciones de c@'odigo por cada bifurcaci@'on del programa. Las\n" "instrucciones de bifurcaci@'on registran la frecuencia de los\n" "diferentes caminos que toman las instrucciones @samp{if} y otras\n" "condicionales. El ejecutable debe ser ejecutado para crear los datos\n" "de cobertura:" #. type: example #, no-wrap msgid "" "$ ./a.out \n" "3 is divisible by 3\n" "6 is divisible by 3\n" "9 is divisible by 3\n" msgstr "" "$ ./a.out\n" "3 es divisible por 3\n" "6 es divisible por 3\n" "9 es divisible por 3" #. type: Plain text msgid "" "The data from the run is written to several files with the extensions @file{." "bb} @file{.bbg} and @file{.da} respectively in the current directory. This " "data can be analyzed using the @code{gcov} command and the name of a source " "file:" msgstr "" "Los datos de la ejecuci@'on son escritos en varios archivos con\n" "extensiones @file{.bb}, @file{.bbg} y @file{.da} respectivamente en el\n" "directorio actual. Estos datos pueden ser analizados usando el comando\n" "@code{gcov} y el nombre del archivo fuente:" #. type: example #, no-wrap msgid "" "$ gcov cov.c \n" " 88.89% of 9 source lines executed in file cov.c\n" "Creating cov.c.gcov\n" msgstr "" "$ gcov cov.es.c \n" " 88.89% of 9 source lines executed in file cov.es.c\n" "Creating cov.es.c.gcov\n" #. type: Plain text msgid "" "The @code{gcov} command produces an annotated version of the original source " "file, with the file extension @file{.gcov}, containing counts of the number " "of times each line was executed:" msgstr "" "El comando @code{gcov} produce una anotaci@'on de la versi@'on del\n" "archivo fuente original, con la extensi@'on @file{.gcov}, conteniendo\n" "los contadores de los n@'umeros de veces que cada l@'{@dotless{i}}nea\n" "fu@'e ejecutada:" #. type: example #, no-wrap msgid "@verbatiminclude cov_c_gcov\n" msgstr "@verbatiminclude cov_c_gcov\n" #. type: Plain text msgid "" "The line counts can be seen in the first column of the output. Lines which " "were not executed are marked with hashes @samp{######}. The command @samp" "{grep '######' *.gcov} can be used to find parts of a program which have not " "been used." msgstr "" "Los contadores de l@'{@dotless{i}}neas pueden verse en la primera\n" "columna. Las l@'{@dotless{i}}neas que no son ejecutadas est@'an\n" "marcadas con almohadillas @samp{######}. El comando @samp{grep\n" "'######' *.gcov} se puede usar para encontrar las partes que no\n" "est@'an siendo usadas." #. type: cindex #, no-wrap msgid "compilation, internal stages of" msgstr "compilaci@'on, etapas internas de" #. type: cindex #, no-wrap msgid "stages of compilation, used internally" msgstr "etapas de compilaci'on, usadas internamente" #. type: cindex #, no-wrap msgid "compiler, how it works internally" msgstr "compilador, como funciona internamente" #. type: cindex #, no-wrap msgid "assembler, @code{as}" msgstr "ensamblador, @code{as}" #. type: cindex #, no-wrap msgid "preprocessor, @code{cpp}" msgstr "preprocesador, @code{cpp}" #. type: cindex #, no-wrap msgid "linker, @code{ld}" msgstr "enlazador, @code{ld}" #. type: cindex #, no-wrap msgid "archiver, @code{ar}" msgstr "archivador, @code{ar}" #. type: Plain text msgid "" "This chapter describes in more detail how GCC transforms source files to an " "executable file. Compilation is a multi-stage process involving several " "tools, including the GNU Compiler itself (through the @code{gcc} or @code{g+" "+} frontends), the GNU Assembler @code{as}, and the GNU Linker @code{ld}. " "The complete set of tools used in the compilation process is referred to as " "a @dfn{toolchain}." msgstr "" "Este cap@'{@dotless{i}}tulo describe en detalle c@'omo GCC transforma\n" "ficheros fuente a un fichero ejecutable. La compilaci@'on es un\n" "proceso multi-fase involucrando varias herramientas, incluyendo el\n" "Compilador de GNU en s@'{@dotless{i}} (a trav@'es de los frontends\n" "@code{gcc} o @code{g++}), el Ensamblador de GNU @code{as}, y el\n" "Enlazador de GNU @code{ld}. El conjunto completo de herramientas\n" "usadas en el proceso de compilaci@'on es llamado @dfn{toolchain}." #. type: section #, no-wrap msgid "An overview of the compilation process" msgstr "Una vista de los procesos de compilaci@'on" #. type: section #, no-wrap msgid "The preprocessor" msgstr "El preprocesador" #. type: section #, no-wrap msgid "The compiler" msgstr "El compilador" #. type: section #, no-wrap msgid "The assembler" msgstr "El ensamblador" #. type: section #, no-wrap msgid "The linker" msgstr "El enlazador" #. type: Plain text msgid "" "The sequence of commands executed by a single invocation of GCC consists of " "the following stages:" msgstr "" "La secuencia de comandos ejecutados por una simple invocaci@'on de GCC\n" "consiste en las siguientes fases:" #. type: itemize msgid "preprocessing (to expand macros)" msgstr "preprocesamiento (expandir macros)" #. type: itemize msgid "compilation (from source code to assembly language)" msgstr "compilaci@'on (desde c@'odigo fuente a lenguaje ensamblador)" #. type: itemize msgid "assembly (from assembly language to machine code)" msgstr "ensamblaje (desde lenguaje ensamblador a c@'odigo m@'aquina)" #. type: itemize msgid "linking (to create the final executable)" msgstr "enlace (crear el ejecutable final)" #. type: Plain text msgid "" "As an example, we will examine these compilation stages individually using " "the @dfn{Hello World} program @file{hello.c}:" msgstr "" "Como ejemplo, se examinar@'an estas fases de compilaci@'on\n" "individualmente usando el programa @dfn{Hola Mundo} @file{hola.es.c}:" #. type: Plain text msgid "" "Note that it is not necessary to use any of the individual commands " "described in this section to compile a program. All the commands are " "executed automatically and transparently by GCC internally, and can be seen " "using the @option{-v} option described earlier (@pxref{Verbose " "compilation}). The purpose of this chapter is to provide an understanding " "of how the compiler works." msgstr "" "N@'otese que no es necesario usar cualquiera de los comandos\n" "individuales descritos en esta secci@'on para compilar un\n" "programa. Todos los comandos son ejecutados de manera autom@'atica y\n" "transparente por GCC internamente, y puede ser visto usando la\n" "opci@'on @option{-v} descrita antes (@pxref{Compilaci@'on\n" "verbosa}). El prop@'osito de este cap@'{@dotless{i}}tulo es\n" "proporcionar un entendimiento de c@'omo el compilador funciona." #. type: Plain text msgid "" "Although the @dfn{Hello World} program is very simple it uses external " "header files and libraries, and so exercises all the major steps of the " "compilation process." msgstr "" "Aunque el programa @dfn{Hola Mundo} es muy simple, @'este usa\n" "cabeceras externas y librer@'{@dotless{i}}as, y as@'{@dotless{i}}\n" "ejercita todos los pasos importantes del proceso de compilaci@'on." #. type: cindex #, no-wrap msgid "preprocessor, first stage of compilation" msgstr "preprocesador, primera etapa de compilaci@'on" #. type: Plain text msgid "" "The first stage of the compilation process is the use of the preprocessor to " "expand macros and included header files. To perform this stage, GCC " "executes the following command:@footnote{As mentioned earlier, the " "preprocessor is integrated into the compiler in recent versions of GCC. " "Conceptually, the compilation process is the same as running the " "preprocessor as separate application.}" msgstr "" "La primera fase del proceso de compilaci@'on es el uso del\n" "preprocesador para expandir macros y ficheros de cabecera\n" "incluidos. Para realizar esta fase, GCC ejecuta el siguiente\n" "comando:@footnote{Como se mencion@'o antes, el preprocesador est@'a\n" "integrado en el compilador en versiones recientes de\n" "GCC. Conceptualmente, el proceso de compilaci@'on es el mismo que\n" "ejecutar el preprocesar como una aplicaci@'on separada.}" #. type: cindex #, no-wrap msgid "@code{.i}, preprocessed file extension for C" msgstr "@code{.i}, extensi@'on de archivo preprocesado para C" #. type: cindex #, no-wrap msgid "@code{i}, preprocessed file extension for C" msgstr "@code{i}, extensi@'on de archivo preprocesado para C" #. type: cindex #, no-wrap msgid "extension, @code{.i} preprocessed file" msgstr "extensi@'on, archivo preprocesado @code{.i}" #. type: cindex #, no-wrap msgid "file extension, @code{.i} preprocessed file" msgstr "extensi@'on de archivo, archivo preprocesado @code{.i}" #. type: cindex #, no-wrap msgid "@code{.ii}, preprocessed file extension for C++" msgstr "@code{.ii}, extensi@'on de archivo preprocesado para C++" #. type: cindex #, no-wrap msgid "@code{ii}, preprocessed file extension for C++" msgstr "@code{ii}, extensi@'on de archivo preprocesado para C++" #. type: cindex #, no-wrap msgid "extension, @code{.ii} preprocessed file" msgstr "extensi@'on, archivo preprocesado @code{.ii}" #. type: cindex #, no-wrap msgid "file extension, @code{.ii} preprocessed file" msgstr "extensi@'on de archivo, archivo preprocesado @code{.ii}" #. type: example #, no-wrap msgid "$ cpp hello.c > hello.i\n" msgstr "$ cpp hola.es.c > hola.i\n" #. type: Plain text msgid "" "The result is a file @file{hello.i} which contains the source code with all " "macros expanded. By convention, preprocessed files are given the file " "extension @file{.i} for C programs and @file{.ii} for C++ programs. In " "practice, the preprocessed file is not saved to disk unless the @option{-" "save-temps} option is used." msgstr "" "El resultado es un fichero @file{hola.i} que contiene el c@'odigo\n" "fuente con todas las macros expandidas. Por convenci@'on, ficheros\n" "preprocesados son dados por la extensi@'on de fichero @file{.i} para\n" "programas C y @file{.ii} para programas C++. En la pr@'actica, el\n" "fichero preprocesado no es guardado en disco a menos que la opci@'on\n" "@option{-save-temps} sea usada." #. type: cindex #, no-wrap msgid "compiler, converting source code to assembly code" msgstr "compilar, convertir c@'odigo fuente a c@'odigo ensamblador" #. type: cindex #, no-wrap msgid "@option{-S} option, create assembly code" msgstr "@option{-S}, opci@'on crear c@'odigo ensamblador" #. type: cindex #, no-wrap msgid "@option{S} option, create assembly code" msgstr "@option{S}, opci@'on para crear c@'odigo ensamblador" #. type: Plain text msgid "" "The next stage of the process is the actual compilation of preprocessed " "source code to assembly language, for a specific processor. The command-" "line option @option{-S} instructs @code{gcc} to convert the preprocessed C " "source code to assembly language without creating an object file:" msgstr "" "La siguiente fase del proceso es compilaci@'on de c@'odigo fuente\n" "preprocesado a lenguaje ensamblador, para un procesador\n" "espec@'{@dotless{i}}fico. La opci@'on @option{-S} dicta a @code{gcc} a\n" "convertir el c@'odigo fuente C a lenguaje ensamblador sin crear un\n" "fichero objeto:" #. type: example #, no-wrap msgid "$ gcc -Wall -S hello.i\n" msgstr "$ gcc -Wall -S hola.i\n" #. type: cindex #, no-wrap msgid "@code{.s}, assembly file extension" msgstr "@code{.s}, extensi@'on de archivo ensamblador" #. type: cindex #, no-wrap msgid "@code{s}, assembly file extension" msgstr "@code{s}, extensi@'on de archivo ensamblador" #. type: cindex #, no-wrap msgid "extension, @code{.s} assembly file" msgstr "extensi@'on, archivo ensamblador @code{.s}" #. type: cindex #, no-wrap msgid "file extension, @code{.s} assembly file" msgstr "extensi@'on de archivo, archivo ensamblador @code{.s}" #. type: Plain text msgid "" "The resulting assembly language is stored in the file @file{hello.s}. Here " "is what the @dfn{Hello World} assembly language for an Intel x86 (i686) " "processor looks like:" msgstr "" "El lenguaje ensamblador resultante es almacenado en el fichero\n" "@file{hola.s}. Aqu@'{@dotless{i}} est@'a el lenguaje ensamblador de\n" "@dfn{Hola Mundo} para un procesador Intel x86 (i686):" #. type: example #, fuzzy, no-wrap msgid "" "$ cat hello.s\n" " .file \"hello.c\"\n" " .section .rodata\n" ".LC0:\n" " .string \"Hello, world!\"\n" " .text\n" " .globl main\n" " .type main, @@function\n" "main:\n" ".LFB0:\n" " .cfi_startproc\n" " pushl %ebp\n" " .cfi_def_cfa_offset 8\n" " .cfi_offset 5, -8\n" " movl %esp, %ebp\n" " .cfi_def_cfa_register 5\n" " andl $-16, %esp\n" " subl $16, %esp\n" " movl $.LC0, (%esp)\n" " call puts\n" " movl $0, %eax\n" " leave\n" " .cfi_restore 5\n" " .cfi_def_cfa 4, 4\n" " ret\n" " .cfi_endproc\n" ".LFE0:\n" " .size main, .-main\n" " .ident \"GCC: (Debian 4.6.1-4) 4.6.1\"\n" " .section .note.GNU-stack,\"\",@@progbits\n" msgstr "" "$ cat hola.s\n" " .file \"hola.es.c\"\n" " .section .rodata\n" ".LC0:\n" " .string \"@exclamdown{}Hola, mundo!\\n\"\n" " .text\n" ".globl main\n" " .type main, @@function\n" "main:\n" " pushl %ebp\n" " movl %esp, %ebp\n" " subl $8, %esp\n" " andl $-16, %esp\n" " movl $0, %eax\n" " subl %eax, %esp\n" " movl $.LC0, (%esp)\n" " call printf\n" " movl $0, %eax\n" " leave\n" " ret\n" " .size main, .-main\n" " .ident \"GCC: (GNU) 3.3.1\"" #. type: Plain text msgid "" "Note that the assembly language contains a call to the external function " "@code{puts}, a simpler version of @code{printf} for strings which do not " "contain formatting characters." msgstr "" "N@'otese que el lenguaje ensamblador contiene una llamada a la\n" "funci@'on externa @code{puts}, una versi@'on simple de @code{printf}\n" "para cadenas que no contienen caracteres formateados." #. type: cindex #, no-wrap msgid "assembler, converting assembly language to machine code" msgstr "ensamblador, convirtiendo lenguaje ensamblador en c@'odigo m@'aquina" #. type: Plain text msgid "" "The purpose of the assembler is to convert assembly language into machine " "code and generate an object file. When there are calls to external " "functions in the assembly source file, the assembler leaves the addresses of " "the external functions undefined, to be filled in later by the linker. The " "assembler can be invoked with the following command line:" msgstr "" "El prop@'osito de un ensamblador es convertir lenguaje ensamblador a\n" "c@'odigo m@'aquina y generar un fichero objeto. Cuando hay llamadas a\n" "funciones externas en el fichero fuente de ensamblador, el ensamblador\n" "deja las direcciones las funciones externas indefinidas, para ser\n" "rellenadas despu@'es por el enlazador. El ensamblador puede ser\n" "invocado con la siguiente l@'{@dotless{i}}nea de comandos:" #. type: example #, no-wrap msgid "$ as hello.s -o hello.o\n" msgstr "$ as hola.s -o hola.o\n" #. type: Plain text #, fuzzy msgid "" "As with GCC, the output file is specified with the @option{-o} option. The " "resulting file @file{hello.o} contains the machine instructions for the @dfn" "{Hello World} program, with an undefined reference to @code{puts}." msgstr "" "Como con GCC, el fichero de salida es especificado con la opci@'on\n" "@option{-o}. El fichero resultante @file{hola.o} contiene las\n" "instrucciones m@'aquina para el programa @dfn{Hola Mundo} con una\n" "referencia indefinida a @code{puts}." #. type: Plain text msgid "" "The final stage of compilation is the linking of object files to create an " "executable. In practice, an executable requires many external functions " "from system and C run-time (@code{crt}) libraries. Consequently, the actual " "link commands used internally by GCC are complicated. For example, the full " "command for linking the @dfn{Hello World} program is typically something " "like this:@footnote{The precise command varies depending on the version of " "@code{gcc} and operating system. Recent versions of @code{gcc} use a " "wrapper called @code{collect2} which does additional work before calling " "@code{ld}.}" msgstr "" "La fase final de compilaci@'on es el enlace de ficheros objeto para\n" "crear un ejecutable. En la pr@'actica, un ejecutable requiere muchas\n" "funciones externas del sistema y de librer@'{@dotless{i}}as C. Por\n" "consiguiente, los comandos de enlace actuales usados internamente por\n" "GCC son complicados. Por ejemplo, el comando completo para enlazar el\n" "programa @dfn{Hola Mundo} es:@footnote{El comando preciso\n" "var@'{@dotless{i}}a dependiendo de la versi@'on de @code{gcc} y el\n" "sistema operativo. Versiones recientes de @code{gcc} usan wrapper\n" "llamado @code{collect2} que hace alg@'un trabajo adicional antes de\n" "llamar a @code{ld}.}" #. type: example #, no-wrap msgid "" "$ ld -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o\n" "/usr/lib/gcc/i486-linux-gnu/4.3/crtbegin.o -L/usr/lib/gcc/i486-linux-gnu/4.3\n" "hello.o -lgcc -lgcc_eh -lc /usr/lib/gcc/i486-linux-gnu/4.3/crtend.o\n" "/usr/lib/crtn.o\n" msgstr "" "$ ld -dynamic-linker /lib/ld-linux.so.2 \\\n" " /usr/lib/crt1.o \\\n" " /usr/lib/crti.o \\\n" " /usr/lib/gcc/i486-linux-gnu/4.3/crtbegin.o \\\n" " -L/usr/lib/gcc/i486-linux-gnu/4.3 hola.o \\\n" " -lgcc -lgcc_eh \\\n" " -lc /usr/lib/gcc/i486-linux-gnu/4.3/crtend.o \\\n" " /usr/lib/crtn.o" #. type: Plain text msgid "" "Fortunately there is never any need to type the command above directly---the " "entire linking process is handled transparently by @code{gcc} when invoked " "as follows:" msgstr "" "Afortunadamente nunca se necesita escribir el comando de arriba\n" "directamente ---el proceso entero de enlace es manejado de manera\n" "transparente por @code{gcc} cuando se invoca como sigue: " #. type: example #, no-wrap msgid "$ gcc hello.o \n" msgstr "$ gcc hola.o \n" #. type: Plain text msgid "" "This links the object file @file{hello.o} to the C standard library, and " "produces an executable file @file{a.out}:" msgstr "" "Esto enlaza el fichero objeto @file{hola.o} a la\n" "librer@'{@dotless{i}}a est@'andar de C, y produce un fichero\n" "ejecutable @file{a.out}:" #. type: example #, no-wrap msgid "" "$ ./a.out \n" "Hello, world!\n" msgstr "" "$ ./a.out \n" "@exclamdown{}Hola, mundo!\n" #. type: Plain text msgid "" "An object file for a C++ program can be linked to the C++ standard library " "in the same way with a single @code{g++} command." msgstr "" "Un fichero objeto para un programa C++ puede ser enlazado a la\n" "librer@'{@dotless{i}}a est@'andar C++ del mismo modo con un simple\n" "comando @code{g++}." #. type: cindex #, no-wrap msgid "examining compiled files" msgstr "examinando archivos compilados" #. type: cindex #, no-wrap msgid "compiled files, examining" msgstr "archivos compilados, examinando" #. type: Plain text msgid "" "This chapter describes several useful tools for examining the contents of " "executable files and object files." msgstr "" "Este cap@'{@dotless{i}}tulo describe varias herramientas comunes para " "examinar el\n" "contenido de los archivos objeto y ejecutables." #. type: section #, no-wrap msgid "Identifying files" msgstr "Identificando archivos" #. type: section #, no-wrap msgid "Examining the symbol table" msgstr "Examinando la tabla de s@'{@dotless{i}}mbolos" #. type: section #, no-wrap msgid "Finding dynamically linked libraries" msgstr "Encontrando librer@'{@dotless{i}}as din@'amicas enlazadas" #. type: cindex #, no-wrap msgid "@code{file} command, for identifying files" msgstr "comando @code{file}, para identificaci@'on de archivos" #. type: cindex #, no-wrap msgid "identifying files, with @code{file} command" msgstr "identificaci@'on de archivos, con comando @code{file}" #. type: cindex #, no-wrap msgid "object file, examining with @code{file} command" msgstr "archivo objeto, examinando con comando @code{file}" #. type: cindex #, no-wrap msgid "executable, examining with @code{file} command" msgstr "ejecutable. examinando con comando @code{file}" #. type: Plain text msgid "" "When a source file has been compiled to an object file or executable the " "options used to compile it are no longer obvious. The @command{file} " "command looks at the contents of an object file or executable and determines " "some of its characteristics, such as whether it was compiled with dynamic or " "static linking." msgstr "" "Cuando un archivo fuente ha sido compilado a un archivo objeto o a un\n" "ejecutable las opciones usadas en la compilaci@'on no son obvias. El\n" "comando @command{file} examina el contenido del archivo objeto o\n" "ejecutable y determina algunas de sus caracter@'{@dotless{i}}sticas,\n" "tal como si fu@'e compilado para enlazado est@'atico o din@'anico." #. type: Plain text msgid "" "For example, here is the result of the @command{file} command for a typical " "executable:" msgstr "" "Por ejemplo, aqu@'{@dotless{i}} se muestra el resultado del comando\n" "@command{file} para un ejecutable t@'{@dotless{i}}pico:" #. type: example #, no-wrap msgid "" "$ file a.out \n" "a.out: ELF 32-bit LSB executable, Intel 80386, \n" " version 1 (SYSV), dynamically linked (uses shared\n" " libs), not stripped\n" msgstr "" "$ file a.out \n" "a.out: ELF 32-bit LSB executable, Intel 80386, \n" " version 1 (SYSV), dynamically linked (uses shared\n" " libs), not stripped\n" #. type: Plain text msgid "" "The output shows that the executable file is dynamically linked, and " "compiled for the Intel 386 and compatible processors. A full explanation of " "the output is shown below:" msgstr "" "La salida muestra que el archivo ejecutable es enlazado con\n" "librer@'{@dotless{i}}as compartidas din@'amicamente, y compilado para\n" "procesadores Intel 386 y compatibles. Una completa explicaci@'on de la\n" "salida se muestra a continuaci@'on:" #. type: item #, no-wrap msgid "ELF" msgstr "ELF" #. type: cindex #, no-wrap msgid "ELF format" msgstr "formato ELF" #. type: cindex #, no-wrap msgid "COFF format" msgstr "formato COFF" #. type: table msgid "" "The internal format of the executable file (ELF stands for ``Executable and " "Linking Format'', other formats such as COFF ``Common Object File Format'' " "are used on some older operating systems (e.g. MS-DOS))." msgstr "" "El formato interno de un archivo ejecutable (ELF proviene de\n" "''Executable and Linking Format'', otros formatos como el COFF\n" "``Common Object File Format'' fueron usados en antiguos sistemas\n" "operativos (p.e. MS-DOS))." #. type: item #, no-wrap msgid "32-bit" msgstr "32 bits" #. type: cindex #, no-wrap msgid "word-size, determined from executable file" msgstr "tama@~o de palabra, determinado desde el archivo ejecutable" #. type: table msgid "The word size (for some platforms this would be 64-bit)." msgstr "" "El tama@~no de palabra (para algunas plataformas esto\n" "ser@'{@dotless{i}}a 64 bits)." #. type: item #, no-wrap msgid "LSB" msgstr "LSB" #. type: cindex #, no-wrap msgid "LSB, least significant byte" msgstr "LSB, byte menos significativo (least significant byte)" #. type: cindex #, no-wrap msgid "MSB, most significant byte" msgstr "MSB, byte m@'as significativo (most significant byte)" #. type: cindex #, no-wrap msgid "Motorola 680x0, word-order" msgstr "Motorola 680x0, ordenaci@'on de palabras" #. type: cindex #, no-wrap msgid "word-ordering, endianness" msgstr "ordenaci@'on de palabras, endianness" #. type: cindex #, no-wrap msgid "endianness, word-ordering" msgstr "endianness, ordenaci@'on de palabras" #. type: cindex #, no-wrap msgid "big-endian, word-ordering" msgstr "big-endian, ordenaci@'on de palabras" #. type: cindex #, no-wrap msgid "little-endian, word-ordering" msgstr "little-endian, ordenaci@'on de palabras" #. type: table msgid "" "Compiled for a platform with @dfn{least significant byte} first word-" "ordering, such as Intel and AMD x86 processors (the alternative MSB @dfn" "{most significant byte} first is used by other processors, such as the " "Motorola 680x0)@footnote{The MSB and LSB orderings are also known as big-" "endian and little-endian respectively (the terms originate from Jonathan " "Swift's satire ``Gulliver's Travels'', 1727).}. Some processors such as " "Itanium and MIPS support both LSB and MSB orderings." msgstr "" "Compilado para una plataforma con ordenaci@'on de palabras donde el\n" "primero es el byte menos significativo (LSB, @dfn{least significat\n" "byte}), tales como los procesadores Intel y AMD x86 (la alternativa el\n" "primero es el byte m@'as significativo (MSB, @dfn{most significant\n" "byte}) es usada en otros procesadores, tales como Motorola\n" "680x0)@footnote{La ordenaci@'on MSB y LSB son conocidas como\n" "big-endian y little-endian respectivamente (el t@'ermino original es\n" "de la s@'atira ``Los viajes de Gulliver'' de Jonathan Swift's, de\n" "1727).}. Algunos procesadores como Itanium y MIPS soportan ambas\n" "ordenaciones LSB y MSB." #. type: item #, no-wrap msgid "Intel 80386" msgstr "Intel 80386" #. type: table msgid "The processor the executable file was compiled for." msgstr "Procesador para el cual ha sido complilado el archivo ejecutable." #. type: item #, no-wrap msgid "version 1 (SYSV)" msgstr "version 1 (SYSV)" #. type: cindex #, no-wrap msgid "SYSV, System V executable format" msgstr "SYSV, formato de ejecutable en System V" #. type: table msgid "This is the version of the internal format of the file." msgstr "Esta es la versi@'on del formato interno del archivo." #. type: item #, no-wrap msgid "dynamically linked" msgstr "dynamically linked" #. type: table msgid "" "The executable uses shared libraries (@code{statically linked} indicates " "programs linked statically, for example using the @option{-static} option)" msgstr "" "El ejecutable emplea librer@'{@dotless{i}}as compartidas din@'amicas\n" "(@code{statically linked} indicar@'{@dotless{i}}a que el programa\n" "fu@'e enlazado est@'aticamente, en el ejemplo usando la opci@'on @option{-" "static})\n" #. type: item #, no-wrap msgid "not stripped" msgstr "not stripped" #. type: cindex #, no-wrap msgid "@code{strip} command" msgstr "comando @code{strip}" #. type: table msgid "" "The executable contains a symbol table (this can be removed with the @command" "{strip} command)." msgstr "" "El ejecutable contiene una tabla de s@'{@dotless{i}}mbolos ( @'esta\n" "puede ser eliminada usando el comando @command{strip})." #. type: Plain text msgid "" "The @command{file} command can also be used on object files, where it gives " "similar output. The POSIX standard@footnote{POSIX.1 (2003 edition), IEEE " "Std 1003.1-2003.} for Unix systems defines the behavior of the @command" "{file} command." msgstr "" "El comando @command{file} puede ser usado con archivos objeto, donde\n" "dar@'a una salida similiar. El est@'andar POSIX@footnote{POSIX.1 (2003\n" "edition), IEEE Std 1003.1.2003.} para sistemas Unix define el\n" "comportamiento del comando @command{file}." #. type: cindex #, no-wrap msgid "symbol table, examining with @code{nm}" msgstr "tabla de s@'{@dotless{i}}mbolos, examinando con @code{nm}" #. type: cindex #, no-wrap msgid "@code{nm} command" msgstr "comando @code{nm}" #. type: Plain text msgid "" "As described earlier in the discussion of debugging, executables and object " "files can contain a symbol table (@pxref{Compiling for debugging}). This " "table stores the location of functions and variables by name, and can be " "displayed with the @command{nm} command:" msgstr "" "Tal y como se describi@'o anteriormente en la discusi@'on sobre\n" "depuraci@'on, los archivos ejecutables y objeto pueden contener una\n" "tabla de s@'{@dotless{i}}mbolos (@pxref{Compilando para\n" "depuraci@'on}). Esta tabla almacena la localizaci@'on de las funciones\n" "y variables por nombre, y puede ser mostrada con el comando\n" "@command{nm}:" #. type: example #, no-wrap msgid "" "$ nm a.out\n" "08049534 d _DYNAMIC\n" "08049608 d _GLOBAL_OFFSET_TABLE_\n" "........\n" "080483e4 T main\n" " U puts@@GLIBC_2.0\n" msgstr "" "$ nm a.out\n" "08049534 d _DYNAMIC\n" "08049608 d _GLOBAL_OFFSET_TABLE_\n" "........\n" "080483e4 T main\n" " U puts@@GLIBC_2.0\n" #. type: Plain text msgid "" "Among the contents of the symbol table, the output shows that the start of " "the @code{main} function has the hexadecimal offset @code{080483e4}. Most " "of the symbols are for internal use by the compiler and operating system. A " "@samp{T} in the second column indicates a function that is defined in the " "object file, while a @samp{U} indicates a function which is undefined (and " "should be resolved by linking against another object file). A complete " "explanation of the output of @code{nm} can be found in the @cite{GNU " "Binutils} manual." msgstr "" "Entre el contenido de la tabla de s@'{@dotless{i}}mbolos, la salida\n" "muestra que el inicio de la funci@'on @code{main} est@'a en el\n" "desplazamiento hexadecimal @code{080483e4}. La mayor@'{@dotless{i}}a\n" "de s@'{@dotless{i}}mbolos es para uso interno del compilador y del\n" "sistema operativo. Una @samp{T} en la segunda columna indica que esta\n" "funci@'on est@'a definida en el archivo objeto, mientras que una\n" "@samp{U} indica que esta funci@'on est@'a indefinida (y se deber@'a\n" "resolver en el enlazado con otro archivo objeto). Una completa\n" "explicaci@'on de la salida de @code{nm} se puede encontrar en la\n" "manual @cite{GNU Binutils}." #. type: cindex #, no-wrap msgid "Binutils, GNU Binary Tools" msgstr "Binutils, GNU Binary Tools" #. type: Plain text msgid "" "The most common use of the @command{nm} command is to check whether a " "library contains the definition of a specific function, by looking for a " "@samp{T} entry in the second column against the function name." msgstr "" "El uso m@'as frecuente del comando @command{nm} es para comprobar si\n" "una librer@'{@dotless{i}}a contiene la definici@'on de una funci@'on\n" "espec@'{@dotless{i}}fica, observando las entradas @samp{T} en la\n" "segunda columna del nombre de la funci@'on." #. type: cindex #, no-wrap msgid "dynamically linked libraries, examining with @code{ldd}" msgstr "librer@'{@dotless{i}}as enlazadas din@'amicamente, examinando con @code{ldd}" #. type: cindex #, no-wrap msgid "shared libraries, examining with @code{ldd}" msgstr "librer@'{@dotless{i}}as compartidas, examinado con @code{ldd}" #. type: cindex #, no-wrap msgid "@code{ldd}, dynamical loader" msgstr "@code{ldd}, cargador din@'amico" #. type: cindex #, no-wrap msgid "dependencies, of shared libraries" msgstr "dependencias, de librer@'{@dotless{i}}as compartidas" #. type: cindex #, no-wrap msgid "shared libraries, dependencies" msgstr "libre@'{@dotless{i}}as compartidas, dependencias" #. type: cindex #, no-wrap msgid "libraries, finding shared library dependencies" msgstr "librer@'{@dotless{i}}as, encontrando dependencias de librer@'{@dotless{i}}as compartidas" #. type: Plain text msgid "" "When a program has been compiled using shared libraries it needs to load " "those libraries dynamically at run-time in order to call external " "functions. The command @command{ldd} examines an executable and displays a " "list of the shared libraries that it needs. These libraries are referred to " "as the shared library @dfn{dependencies} of the executable." msgstr "" "Cuando un programa ha sido compilado usando librer@'{@dotless{i}}as\n" "compartidas necesita cargar estas librer@'{@dotless{i}}as\n" "din@'amicamente en tiempo de ejecuci@'on para realizar las llamadas a\n" "funciones externas. El comando @command{ldd} examina un ejecutable y\n" "muestra la lista de librer@'{@dotless{i}}as compartidas que\n" "necesita. Estas librer@'{@dotless{i}}as son referidas como\n" "librer@'{@dotless{i}}as compartidas @dfn{dependientes} del\n" "ejecutable." #. type: Plain text msgid "" "For example, the following commands demonstrate how to find the shared " "library dependencies of the @dfn{Hello World} program:" msgstr "" "Por ejemplo, el siguiente comando muestra como se encuentra la\n" "librer@'{@dotless{i}}a compartida como dependencia del programa\n" "@dfn{Hola Mundo}:" #. type: example #, no-wrap msgid "" "$ gcc -Wall hello.c\n" "$ ldd a.out \n" "libc.so.6 => /lib/libc.so.6 (0x40020000)\n" "/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)\n" msgstr "" "$ gcc -Wall hola.es.c\n" "$ ldd a.out\n" "libc.so.6 => /lib/libc.so.6 (0x40020000)\n" "/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)" #. type: Plain text msgid "" "The output shows that the @dfn{Hello World} program depends on the C library " "@code{libc} (shared library version 6) and the dynamic loader library @code" "{ld-linux} (shared library version 2)." msgstr "" "La salida muestra que el programa @dfn{Hola Mundo} depende de la\n" "librar@'{@dotless{i}}a C @code{libc} (librer@'{@dotless{i}}a\n" "compartida versi@'on 6) y de la librer@'{@dotless{i}}a de carga\n" "din@'amica @code{ld-linux} (librer@'{@dotless{i}}a compartida\n" "versi@'on 2). " #. type: Plain text msgid "" "If the program uses external libraries, such as the math library, these are " "also displayed. For example, the @code{calc} program (which uses the @code" "{sqrt} function) generates the following output:" msgstr "" "Si el programa usa librer@'{@dotless{i}}as externas, tal como la\n" "librer@'{@dotless{i}}a matem@'atica, @'estas tambi@'en\n" "ser@'{@dotless{i}}an mostradas. Por ejemplo, el programa @code{calc}\n" "(el cual usa la funci@'on @code{sqrt}) genera la siguiente salida:" #. type: example #, no-wrap msgid "" "$ gcc -Wall calc.c -lm -o calc\n" "$ ldd calc\n" "libm.so.6 => /lib/libm.so.6 (0x40020000)\n" "libc.so.6 => /lib/libc.so.6 (0x40041000)\n" "/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)\n" msgstr "" "$ gcc -Wall calc.es.c -lm -o calc\n" "$ ldd calc\n" "libm.so.6 => /lib/libm.so.6 (0x40020000)\n" "libc.so.6 => /lib/libc.so.6 (0x40041000)\n" "/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)\n" #. type: Plain text msgid "" "The first line shows that this program depends on the math library @code" "{libm} (shared library version 6), in addition to the C library and dynamic " "loader library." msgstr "" "La primera l@'{@dotless{i}}nea muestra que este programa depende de la\n" "librer@'{@dotless{i}}a matem@'atica @code{libm}\n" "(librer@'{@dotless{i}}a compartida veris@'on 6), adem@'as de las\n" "librer@'{@dotless{i}}a de C y la librer@'{@dotless{i}}a de carga din@'amica." #. type: Plain text msgid "" "The @code{ldd} command can also be used to examine shared libraries " "themselves, in order to follow a chain of shared library dependencies." msgstr "" "El comando @code{ldd} puede ser usado para examinar estas mismas\n" "librer@'{@dotless{i}}as compartidas, con objeto de seguir la cadena de\n" "dependencia de librer@'{@dotless{i}}as compartidas." #. type: cindex #, no-wrap msgid "error messages, common examples" msgstr "mensajes de error, ejemplos comunes" #. type: cindex #, no-wrap msgid "common error messages" msgstr "mensajes comunes de error" #. type: Plain text msgid "" "This chapter describes the most frequent error and warning messages produced " "by @code{gcc} and @code{g++}. Each case is accompanied by a description of " "the causes, an example and suggestions of possible solutions. Note that " "error messages may vary slightly between different versions of the " "compiler. Some messages may only be displayed with options such as @option{-" "Wall} and @option{-W}." msgstr "" "Este cap@'{@dotless{i}}tulo describe los errores y avisos m@'as\n" "frecuentes producidos por @code{gcc} y @code{g++}. Cada caso est@'a\n" "acompa@~nado por una descripci@'on de las causas, un ejemplo y\n" "sugerencias de posibles soluciones. N@'otese que los mensajes de error\n" "puede variar ligeramente entre las diferentes versiones del\n" "compilador. Algunos mensajes puede solo se mostrados con opciones\n" "tales @option{-Wall} y @option{-W}." #. type: section #, no-wrap msgid "Preprocessor error messages" msgstr "Mensajes de error del preprocesador" #. type: section #, no-wrap msgid "Compiler error messages" msgstr "Mensajes de error del compilador" #. type: section #, no-wrap msgid "Linker error messages" msgstr "Mensajes de error del enlazador" #. type: section #, no-wrap msgid "Runtime error messages" msgstr "Mensajes de error en tiempo de ejecuci@'on" #. type: cindex #, no-wrap msgid "preprocessor, error messages" msgstr "Preprocesador, mensajes de error" #. type: cindex #, no-wrap msgid "No such file or directory" msgstr "No such file or directory" #. type: table msgid "" "This error occurs if GCC cannot find a requested file on its search path. " "The file may have been specified on the command-line, or with a preprocessor " "@code{#include} statement. Either the filename has been spelled incorrectly " "or the directory for the file needs to be added to the include path or link " "path." msgstr "" "Este error ocurre si GCC no puede encontrar un fichero pedido en su\n" "ruta de b@'usqueda. El fichero puede haber sido especificado en la\n" "l@'{@dotless{i}}nea de comandos, o con una sentencia\n" "@code{#include}. Si el nombre del fichero ha sido tecleado\n" "incorrectamente o el directorio del fichero necesita ser a@~nadido\n" "para la ruta include o la ruta de enlace." #. type: table msgid "Example:" msgstr "Ejemplo:" #. type: example #, no-wrap msgid "@verbatiminclude msg-file.c\n" msgstr "@verbatiminclude msg-file.es.c\n" #. type: table msgid "" "The program above tries to include the non-existent file @file{stdoi.h} " "giving the error @samp{stdoi.h: No such file or directory}. The correct " "filename should be @file{stdio.h}." msgstr "" "El programa de arriba intenta incluir el fichero inexistente\n" "@file{stdoi.h} dando el error @samp{stdoi.h: No such file or\n" "directory}. El nombre de fichero correcto es @file{stdio.h}." #. type: cindex #, no-wrap msgid "macro or '#include' recursion too deep" msgstr "macro or '#include' recursion too deep" #. type: itemx #, no-wrap msgid "#include nested too deeply" msgstr "#include nested too deeply" #. type: cindex #, no-wrap msgid "include nested too deeply" msgstr "include nested too deeply" #. type: table msgid "" "This error occurs if the preprocessor encounters too many nested @samp" "{#include} directives. It is usually caused by two or more files trying to " "include each other, leading to an infinite recursion." msgstr "" "Este error ocurre si el preprocesador encuentra demasiadas directivas\n" "@samp{#include} anidadas. Esto es normalmente causado por dos @'o\n" "m@'as ficheros intentando incluir otro, provocando una recursi@'on\n" "infinita." #. type: example #, no-wrap msgid "@verbatiminclude msg-nest1.h\n" msgstr "@verbatiminclude msg-nest1.es.h\n" #. type: example #, no-wrap msgid "@verbatiminclude msg-nest2.h\n" msgstr "@verbatiminclude msg-nest2.es.h\n" #. type: table msgid "" "The solution to this problem is to ensure that files do not mutually include " "each other, or to use ``include guards'' (@pxref{Providing your own " "templates} for an example)." msgstr "" "La soluci@'on a este problema es asegurar que los ficheros no se\n" "incluyen mutuamente, o usar `guardas include' (@pxref{Proporcionando\n" "sus propias plantillas} por ejemplo)." #. type: item #, no-wrap msgid "invalid preprocessing directive #..." msgstr "invalid preprocessing directive #..." #. type: cindex #, no-wrap msgid "invalid preprocessing directive" msgstr "directiva de preprocesamiento inv@'alida" #. type: table msgid "" "This error indicates that the preprocessor encountered an unrecognized @code" "{#} command." msgstr "" "Este error indica que el preprocesador encontr@'o un comando @code{#}\n" "irreconocible." #. type: example #, no-wrap msgid "@verbatiminclude msg-invalidpp.c\n" msgstr "@verbatiminclude msg-invalidpp.es.c\n" #. type: table msgid "" "The preprocessor syntax requires @code{#elif} for the ``else if'' condition " "in @code{#if} blocks, rather than @code{#elseif}. In the example above an " "invalid directive error occurs at the incorrect usage @code{#elseif}, but " "only when @code{FOO} is defined (otherwise the preprocessor ignores " "everything up to the @code{#else} statement)." msgstr "" "La sintaxis de preprocesador requiere @code{#elif} para la condici@'on\n" "``else if'' en los bloques @code{#if}, en vez de @code{#elseif}. En el\n" "ejemplo de arriba ocurre un error de directiva inv@'alida en el\n" "incorrecto uso de @code{#elseif}, pero solo cuando @code{FOO} est@'a\n" "definido (en otros casos el preprocesador ignora cualquiera de la\n" "sentencia @code{#else})." #. type: cindex #, no-wrap msgid "@code{#elif}, preprocessor directive" msgstr "@code{#elif}, directiva del precompilador" #. type: cindex #, no-wrap msgid "@code{#else}, preprocessor directive" msgstr "@code{#else}, directiva del preprocesador" #. type: cindex #, no-wrap msgid "compiler, error messages" msgstr "compilador, mensajes de error" #. type: item #, no-wrap msgid "`@var{variable}' undeclared (first use in this function)" msgstr "`@var{variable}' undeclared (first use in this function)" #. type: cindex #, no-wrap msgid "undeclared variable" msgstr "variable no declarada" #. type: table msgid "" "In C and C++ variables must be declared before they can be used. This error " "message indicates that the compiler has encountered a variable name which " "does not have a corresponding declaration. It can be caused by a missing " "declaration, or a typing error in the name. Variable names are case-" "sensitive, so @code{foo} and @code{Foo} represent different variables. To " "keep the output short, only the first use of an undeclared variable is " "reported." msgstr "" "En C y C++ las variables deben ser declaradas antes de poder ser\n" "usadas. Este mensaje de error indica que el compilador ha encontrado\n" "un nombre de variable que no tiene su declaraci@'on\n" "correspondiente. Esto puede ser causado por una declaraci@'on perdida,\n" "o por un error de escritura en el nombre. Los nombres de variables son\n" "sensibles a may@'usculas, as@'{@dotless{i}} @code{foo} y @code{Foo}\n" "representan diferentes variables. Para mantener breve la salida,\n" "s@'olo se informa del primer uso de una variable no declarada." #. type: example #, no-wrap msgid "@verbatiminclude msg-undeclared.c\n" msgstr "@verbatiminclude msg-undeclared.es.c\n" #. type: table msgid "" "The variable @code{j} is not declared and will trigger the error @code{`j' " "undeclared}." msgstr "" "La variable @code{j} no est@'a declarada y saltar@'a el error\n" "@code{`j' undeclared}." #. type: item #, no-wrap msgid "parse error before `...'" msgstr "parse error before `...'" #. type: itemx #, fuzzy, no-wrap #| msgid "expected ‘;’ before `...'" msgid "expected ';' before `...'" msgstr "expected ‘;’ before `...'" #. type: cindex #, no-wrap msgid "syntax error" msgstr "syntax error" #. type: cindex #, no-wrap msgid "parse error" msgstr "parse error" #. type: table msgid "" "These error messages occur when the compiler encounters unexpected input, i." "e. sequences of characters which do not follow the syntax of the language. " "The error messages can be triggered by a missing close bracket, brace or " "semicolon preceding the line of the error, or an invalid keyword." msgstr "" "Este mensaje de error ocurre cuando el compilador encuentra una\n" "entrada inesperada, p.e. secuencias de caracteres que no siguen la\n" "sintaxis del lenguaje. Este mensaje de error salta por la ausencia de\n" "par@'entesis o llaves de cierre o punto y coma precediendo la\n" "l@'{@dotless{i}}nea de error, o una palabra reservada inv@'alida." #. type: example #, no-wrap msgid "@verbatiminclude msg-parse.c\n" msgstr "@verbatiminclude msg-parse.es.c\n" #. type: table msgid "" "There is a missing semicolon after the first call to @code{printf}, giving a " "parse error." msgstr "" "Aqu@'{@dotless{i}} hay una ausencia de punto y coma despu@'es de la\n" "primera llamada a @code{printf}, dando un @code{error de parseo}." #. type: cindex #, no-wrap msgid "parse error at end of input" msgstr "parse error at end of input" #. type: itemx #, no-wrap msgid "expected declaration or statement at end of input" msgstr "expected declaration or statement at end of input" #. type: table msgid "" "This error occurs if the compiler encounters the end of a file unexpectedly, " "such as when it has parsed an unbalanced number of opening and closing " "braces. It is often caused by a missing closing brace somewhere." msgstr "" "Este error ocurre si el compilador encuentra un final de archivo\n" "inesperadamente, tal como cuando se analizan un n@'umero no balanceado\n" "de llaves de apertura y cierre. Es a menudo causado por la ausencia de\n" "un cierre de llaves en alg@'un lugar." #. type: example #, no-wrap msgid "@verbatiminclude msg-eoi.c\n" msgstr "@verbatiminclude msg-eoi.es.c\n" #. type: table msgid "" "An additional closing brace is needed in this program to prevent the error " "@code{expected declaration or statement at end of input}." msgstr "" "Una llave de cierre adicional es necesaria en este programa para\n" "prevenir el error @code{expected declaration or statement at end of\n" "input}." #. type: item #, no-wrap msgid "warning: implicit declaration of function `...'" msgstr "warning: implicit declaration of function `...'" #. type: itemx #, no-wrap msgid "warning: incompatible implicit declaration of built-in function `...'" msgstr "warning: incompatible implicit declaration of built-in function `...'" #. type: table msgid "" "This warning is generated when a function is used without a prototype being " "declared. It can be caused by failing to include a header file, or " "otherwise forgetting to provide a function prototype." msgstr "" "Este aviso es generado cuando una funci@'on es usada sin un prototipo\n" "declarado. Esto puede ser causado por la falta de inclusi@'on de una\n" "archivo de cabeceras, o si no olvidando suministrar un prototipo de " "funci@'on." #. type: example #, no-wrap msgid "@verbatiminclude msg-implicitdecl.c\n" msgstr "@verbatiminclude msg-implicitdecl.es.c\n" #. type: table msgid "" "The system header file @file{stdio.h} is not included, so the prototype for " "@code{printf} is not declared. The program needs an initial line @code" "{#include }." msgstr "" "El archivo de cabeceras del sistema @file{stdio.h} no est@'a incluido,\n" "as@'{@dotless{i}} que el prototipo de la funci@'on @code{printf} no ha\n" "sido declarado. El programa necesita una l@'{@dotless{i}}nea inicial\n" "@code{#include }." #. type: cindex #, no-wrap msgid "unterminated string or character constant" msgstr "unterminated string or character constant" #. type: itemx #, no-wrap msgid "missing terminating \" character" msgstr "missing terminating \" character" #. type: table msgid "" "This error is caused by an opening string or character quote which does not " "have a corresponding closing quote. Quotes must occur in matching pairs, " "either single quotes @code{'a'} for characters or double quotes @code{\"aaa" "\"} for strings." msgstr "" "Este error es causado por unas comillas de apertura de una cadena o\n" "car@'acter que no tiene su correspondiente comillas de cierre. Las\n" "comillas deben aparecer en parejas coincidentes, como una comilla\n" "simple @code{'a'} para caracteres o dobles comillas @code{\"aaa\"} para " "cadenas." #. type: example #, no-wrap msgid "@verbatiminclude msg-unterm.c\n" msgstr "@verbatiminclude msg-unterm.es.c\n" #. type: table msgid "" "The opening quote for the string in this program does not have a " "corresponding closing quote, so the compiler will read the rest of the file " "as part of the string." msgstr "" "Las dobles comillas de apertura de la cadena en este programa no tiene\n" "su correspondiente dobles comillas de cierre, as@'{@dotless{i}} el\n" "compilador lee el resto del archivo como parte de la cadena." #. type: cindex #, no-wrap msgid "character constant too long" msgstr "character constant too long" #. type: table msgid "" "In C and C++ character codes are written using single quotes, e.g. @code" "{'a'} gives the ASCII code for the letter a (67), and @code{'\\n'} gives the " "ASCII code for newline (10). This error occurs if single quotes are used to " "enclose more than one character." msgstr "" "En C y C++ los caracteres son escritos usando simples comillas,\n" "p.e. @code{'a'} da el c@'odigo ASCII de la letra a (67), y\n" "@code{'\\n'} da el c@'odigo ASCII de nueva l@'{@dotless{i}}nea\n" "(10). Este error ocurre si unas comillas simples son usadas para\n" "encerrar m@'as de un car@'acter." #. type: example #, no-wrap msgid "@verbatiminclude msg-string2.c\n" msgstr "@verbatiminclude msg-string2.es.c\n" #. type: table msgid "" "The program above confuses single-quotes and double-quotes. A sequence of " "characters should be written with double quotes, e.g. @code{\"Hello World!" "\"}. This same problem occurs in the following C++ program," msgstr "" "El programa anterior confunde las comillas simples y dobles. Una\n" "secuencia de caracteres se debe escribir con comillas dobles,\n" "p.e. @code{\"@exclamdown{}Hola Mundo!\"}. Este mismo problema ocurre en\n" "el siguiente programa C++," #. type: example #, no-wrap msgid "@verbatiminclude msg-string2.cc\n" msgstr "@verbatiminclude msg-string2.es.cc\n" #. type: table msgid "" "This error can also occur if the forward slash and backslash are confused in " "an escape sequence, e.g. using @code{'/n'} instead of @code{'\\n'}. The " "sequence @code{/n} consists of two separate characters, @samp{/} and @samp" "{n}." msgstr "" "Este error puede ocurrir si la barra de divisi@'on y la barra\n" "invertida son confundidas en una secuencia de escape, p.e. usando\n" "@code{'/n'} en vez de @code{'\\n'}. La secuencia @code{/n} consiste en\n" "dos caracteres separados, @samp{/} y @samp{n}. " #. type: table msgid "" "Note that according to the C standard there is no limit on the length of a " "character constant, but the value of a character constant that contains more " "than one character is implementation-defined. Recent versions of GCC " "provide support multi-byte character constants, and instead of an error the " "warnings @code{multiple-character character constant} or @code{warning: " "character constant too long for its type} are generated in this case." msgstr "" "Observe que de acuerdo con el est@'andar C no hay l@'{@dotless{i}}mite\n" "en la longitud de una constante car@'acter, pero el valor de una\n" "constante car@'acter que contiene m@'as de un car@'acter est@'a\n" "definido en la implementaci@'on. Versiones m@'as recientes de GCC\n" "soportan constantes de car@'acter multi-byte, y en vez de avisar de un\n" "error @code{multiple-character character constant},ser@'a generado en\n" "este caso @code{warning: character constant too long for its type}." #. type: cindex #, no-wrap msgid "multiple-character character constant" msgstr "constante car@'acter multi-car@'acter" #. type: item #, no-wrap msgid "warning: initialization makes integer from pointer without a cast" msgstr "warning: initialization makes integer from pointer without a cast" #. type: cindex #, no-wrap msgid "initialization makes integer from pointer without a cast" msgstr "initialization makes integer from pointer without a cast" #. type: table msgid "" "This error indicates a misuse of a pointer in an integer context. " "Technically, it is possible to convert between integer and pointer types, " "but this is rarely needed outside system-level applications. More often, " "this warning is the result of using a pointer without dereferencing it (e." "g. writing @code{int i = p} instead of @code{int i = *p})." msgstr "" "Este error indica el uso err@'oneo de un puntero en un contexto\n" "entero. T@'ecnicamente, es posible convertir entre tipos punteros y\n" "enteros, pero es raramente necesario fuera de las aplicaciones a nivel\n" "de sistema. M@'as a menudo, este aviso es el resultado de usar un\n" "puntero sin desreferenciarlo (p.e. escribiendo @code{int i=p} en vez\n" "de @code{int i = *p})." #. type: table msgid "" "This warning can also occur with @code{char} and @code{char *} types, since " "@code{char} is an integer type." msgstr "" "Este aviso puede ocurrir con tipos @code{char} y @code{char *}, desde\n" "que @code{char} es un tipo entero." #. type: example #, no-wrap msgid "@verbatiminclude msg-char.c\n" msgstr "@verbatiminclude msg-char.es.c\n" #. type: table msgid "" "The variable @code{c} has type @code{char}, while the string @code{\"\\n\"} " "evaluates to a @code{const char *} pointer (to a 2-byte region of memory " "containing the ASCII value for newline followed by a zero byte @code{'\\0'}, " "since strings are null-terminated). The ASCII code for newline can be found " "using @code{char c = '\\n';}" msgstr "" "La variable @code{c} tiene tipo @code{char}, mientras que la cadena\n" "@code{'\\n'} se evalua como un puntero a @code{const char *} (una zona\n" "de 2 bytes de memoria contiene el valor ASCII del car@'acter nueva\n" "l@'{@dotless{i}}nea seguido de un byte a cero @code{'\\0'}, con el cual\n" "la cadena est@'a nul-terminada). El c@'odigo ASCII para el car@'acter\n" "nueva l@'{@dotless{i}}nea se puede encontrar usando @code{char c = '\\n';}" #. type: table msgid "Similar errors can occur with misuse of the macro @code{NULL}," msgstr "" "Errores similares pueden ocurrir con el uso incorrecto de la macro @code" "{NULL}," #. type: example #, no-wrap msgid "@verbatiminclude msg-null.c\n" msgstr "@verbatiminclude msg-null.es.c\n" #. type: table msgid "" "In C, the macro @code{NULL} is defined as @code{((void *)0)} in @file{stdlib." "h} and should only be used in a pointer context." msgstr "" "En C, la macro @code{NULL} es definida como @code{((void *)0)} en\n" "@file{stdio.h} y solamente deber@'{@dotless{i}}a ser usada en un\n" "contexto de puntero." #. type: cindex #, no-wrap msgid "dereferencing pointer to incomplete type" msgstr "dereferencing pointer to incomplete type" #. type: table msgid "" "This error occurs when a program attempts to access the elements of struct " "through a pointer without the layout of the struct being declared first. In " "C and C++ it is possible to declare pointers to structs before declaring " "their struct layout, provided the pointers are not dereferenced---this is " "known as @dfn{forward declaration}." msgstr "" "Este error ocurre cuando un programa intenta acceder a un elemento de\n" "una estructura a trav@'es de un puntero sin que la estructura haya\n" "sido declarada anteriormente. En C y C++ es posible declarar punteros\n" "a estructuras antes de la declaraci@'on de las estructuras,\n" "proporcionando los punteros que no son referenciados ---Esto es\n" "conocido como @dfn{declaraci@'on avanzada} (forward declaration)." #. type: example #, no-wrap msgid "@verbatiminclude msg-derefincomplete.c\n" msgstr "@verbatiminclude msg-derefincomplete.es.c\n" #. type: table msgid "" "This program has a forward declaration of the @code{btree} struct @code" "{data}. However, the definition of the struct is needed before the pointer " "can be dereferenced to access individual members." msgstr "" "Este programa tiene una declaraci@'on posterior de @code{data} como\n" "estructura @code{btree}. Sin embargo, la definici@'on de la estructura\n" "es necesaria antes de que el puntero pueda ser referenciado para\n" "acceder a sus miembros individualmente." #. type: item #, no-wrap msgid "warning: unknown escape sequence `...'" msgstr "warning: unknown escape sequence `...'" #. type: cindex #, no-wrap msgid "unknown escape sequence" msgstr "unknown escape sequence" #. type: table msgid "" "This error is caused by an incorrect use of the escape character in a " "string. Valid escape sequences are:" msgstr "" "Este error es causado por un incorrecto uso del car@'acter de escape en\n" "una cadena. Las secuencias de escape v@'alidas son:" #. type: multitable msgid "@code{\\n} newline" msgstr "@code{\\n} nueva l@'{@dotless{i}}nea" #. type: multitable msgid "@code{\\t} tab" msgstr "@code{\\t} tabulador" #. type: multitable msgid "@code{\\b} backspace" msgstr "@code{\\b} retroceso" #. type: multitable msgid "@code{\\r} carriage return" msgstr "@code{\\r} retorno de carro" #. type: multitable msgid "@code{\\f} form feed" msgstr "@code{\\f} alimentaci@'on de l@'{@dotless{i}}nea" #. type: multitable msgid "@code{\\v} vertical tab" msgstr "@code{\\v} tabulador vertical" #. type: multitable msgid "@code{\\a} alert (bell)" msgstr "@code{\\a} alerta (campana)" #. type: table msgid "" "The combinations @code{\\\\}, @code{\\'}, @code{\\\"} and @code{\\?} can be " "used for individual characters. Escape sequences can also use octal codes " "@code{\\0}--@code{\\377} and hexadecimal codes @code{\\0x00}--@code{\\0xFF}." msgstr "" "Las combinaciones @code{\\\\}, @code{\\'}, @code{\\\"} y @code{\\?} pueden\n" "ser usadas para caracteres individuales. Las secuencias de escape\n" "pueden usar c@'odigos octales @code{\\0}--@code{\\377} y c@'odigos\n" "hexadecimales @code{\\0x00}--@code{\\0xFF}." #. type: example #, no-wrap msgid "@verbatiminclude msg-unknownesc.c\n" msgstr "@verbatiminclude msg-unknownesc.es.c\n" #. type: table msgid "" "The escape sequence @code{\\N} in the program above is invalid---the correct " "escape sequence for a newline is @code{\\n}." msgstr "" "La secuencia de escape @code{\\N} en el programa anterior es inv@'alida\n" "---La correcta secuencia de escape para el car@'acter de nueva\n" "l@'{@dotless{i}}nea es @code{\\n}." #. type: item #, no-wrap msgid "warning: suggest parentheses around assignment used as truth value" msgstr "warning: suggest parentheses around assignment used as truth value" #. type: cindex #, no-wrap msgid "suggest parentheses around assignment used as truth value" msgstr "suggest parentheses around assignment used as truth value" #. type: table msgid "" "This warning highlights a potentially serious error, using the assignment " "operator @samp{=} instead of the comparison operator @samp{==} in the test " "of a conditional statement or other logical expression. While the " "assignment operator can be used as part of a logical value, this is rarely " "the intended behavior." msgstr "" "Este aviso resalta un potencial serio error, usando el operador\n" "@samp{=} en vez del operador de comparaci@'on @samp{==} en el test de\n" "la instrucci@'on condicional o en otra expresi@'on l@'ogica. Mientras\n" "el operador de asignaci@'on puede ser usado como parte de un valor\n" "l@'ogico, @'este es raramente el comportamiento deseado." #. type: example #, no-wrap msgid "@verbatiminclude msg-assign.c\n" msgstr "@verbatiminclude msg-assign.es.c\n" #. type: table msgid "" "The test above should be written as @code{if (i == 1)}, otherwise the " "variable @code{i} will be set to @code{1} by the evaluation of the if " "statement itself. The operator @samp{=} both assigns and returns the value " "of its right-hand side, causing the variable @code{i} to be modified and the " "unexpected branch taken. Similar unexpected results occur with @code{if (i " "= 0)} instead of @code{if (i == 0)}, except that in this case the body of " "the @code{if} statement would never be executed." msgstr "" "El test anterior deber@'{@dotless{i}}a haberse escrito como @code{if\n" "(i == 1)}, en otro caso la variable @code{i} ser@'a puesta a @code{1}\n" "por la evaluaci@'on de la misma instrucci@'on if. El operador @samp{=}\n" "tanto asigna como devuelve el valor de su parte derecha, causando que\n" "la variable @code{i} sea modificada y se tome una bifurcaci@'on\n" "inesperada. Similar resultado inesperado sucede con @code{if (i = 0)}\n" "en vez de @code{if (i == 0)}, excepto que en este caso el cuerpo de\n" "la instrucci@'on @code{if} nunca ser@'a ejecutado." #. type: table msgid "" "This warning is suppressed if the assignment is enclosed in additional " "parentheses to indicate that it is being used legitimately." msgstr "" "Este aviso se suprime si la instrucci@'on es encerrada entre\n" "par@'entesis adicionales para indicar que est@'a siendo usado\n" "leg@'{@dotless{i}}timamente. " #. type: item #, no-wrap msgid "warning: control reaches end of non-void function" msgstr "warning: control reaches end of non-void function" #. type: cindex #, no-wrap msgid "control reaches end of non-void function" msgstr "control reaches end of non-void function" #. type: table msgid "" "A function which has been declared with a return type, such as @code{int} or " "@code{double}, should always have a @code{return} statement returning a " "value of the corresponding type at all possible end points---otherwise its " "return value is not well-defined. Functions declared @code{void} do not " "need @code{return} statements." msgstr "" "Una funci@'on que fu@'e declarada con un tipo de retorno, tal como\n" "@code{int} o @code{double}, debe tener siempre una instrucci@'on\n" "@code{return} devolviendo un valor del correspondiente tipo en todos\n" "los puntos de salida posibles ---en otro caso el valor de retorno no\n" "est@'a bien definido. Las funciones declaradas @code{void} no\n" "necesitan instrucciones @code{return}." #. type: example #, no-wrap msgid "@verbatiminclude msg-control.c\n" msgstr "@verbatiminclude msg-control.es.c\n" #. type: table msgid "" "The program above reaches the end of the @code{display} function, which has " "a return type of @code{int}, without a @code{return} statement. An " "additional line such as @code{return 0;} is needed." msgstr "" "El programa anterior alcanza el final de la funci@'on @code{display},\n" "la cual retorna un tipo @code{int}, sin una instrucci@'on\n" "@code{return}. Una l@'{@dotless{i}}nea adicional como @code{return 0;}\n" "es necesaria." #. type: table msgid "" "When using @code{gcc} the @code{main} function of a C program must return a " "value of type @code{int} (the exit status of the program). In C++ the @code" "{return} statement can be omitted from the @code{main} function---the return " "value of the C++ @code{main} function defaults to 0 if unspecified." msgstr "" "Cuando se usa @code{gcc} la funci@'on @code{main} de un programa C\n" "debe devolver un valor de tipo @code{int} (el estado de salida del\n" "programa). En C++ la instrucci@'on @code{return} puede ser omitida en\n" "la funci@'on @code{main} ---el valor de retorno de la funci@'on\n" "@code{main} por defecto es 0 si no es especificado." #. type: item #, no-wrap msgid "warning: unused variable `...'" msgstr "warning: unused variable `...'" #. type: itemx #, no-wrap msgid "warning: unused parameter `...'" msgstr "warning: unused parameter `...'" #. type: cindex #, no-wrap msgid "unused parameter warning" msgstr "unused parameter warning" #. type: table msgid "" "These warnings indicate that a variable has been declared as a local " "variable or in the parameters of a function, but has not been used " "anywhere. An unused variable can be the result of a programming error, such " "as accidentally using the name of a different variable in place of the " "intended one." msgstr "" "Este aviso indica que una variable ha sido declarada como variable\n" "local o par@'ametro de una funci@'on, pero no ha sido usada en\n" "ning@'un lugar. Una variable no usada puede ser el resultado de un\n" "error de programaci@'on, tal como usar accidentalmente el nombre de\n" "una variable en vez de otro." #. type: example #, no-wrap msgid "@verbatiminclude msg-unused.c\n" msgstr "@verbatiminclude msg-unused.es.c\n" #. type: table msgid "" "In this program the variable @code{i} and the parameter @code{p} are never " "used. Note that unused variables are reported by @option{-Wall}, while " "unused parameters are only shown with @option{-Wall -W}." msgstr "" "En este programa la variable @code{i} y el par@'ametro @code{p} nunca\n" "son usados. Observe que las variables no usadas son informadas por al\n" "opci@'on @option{-Wall}, mientras que los par@'ametros no usados\n" "s@'olo se muestran con @option{-Wall -W}." #. type: item #, no-wrap msgid "warning: passing arg of ... as ... due to prototype" msgstr "warning: passing arg of ... as ... due to prototype" #. type: cindex #, no-wrap msgid "passing arg of function as another type to prototype" msgstr "passing arg of function as another type to prototype" #. type: table msgid "" "This warning occurs when a function is called with an argument of a " "different type from that specified in the prototype. The option @option{-" "Wconversion} is needed to enable this warning. See the description of @option" "{-Wconversion} in @ref{Additional warning options} for an example." msgstr "" "Este aviso ocurrre cuando una funci@'on es llamada con un argumento de\n" "diferente tipo al especificado en su prototipo. La opci@'on\n" "@option{-Wconversion} es necesaria para habilitar estos avisos. Vea la\n" "descripci@'on de @option{-Wconversion} en @ref{Opciones de aviso\n" "adicionales} para ver un ejemplo." #. type: item #, no-wrap msgid "warning: assignment of read-only location" msgstr "warning: assignment of read-only location" #. type: itemx #, no-wrap msgid "warning: cast discards qualifiers from pointer target type" msgstr "warning: cast discards qualifiers from pointer target type" #. type: itemx #, no-wrap msgid "warning: assignment discards qualifiers ..." msgstr "warning: assignment discards qualifiers ..." #. type: itemx #, no-wrap msgid "warning: initialization discards qualifiers ..." msgstr "warning: initialization discards qualifiers ..." #. type: itemx #, no-wrap msgid "warning: return discards qualifiers ..." msgstr "warning: return discards qualifiers ..." #. type: cindex #, no-wrap msgid "assignment of read-only location" msgstr "assignment of read-only location" #. type: cindex #, no-wrap msgid "cast discards qualifiers from pointer target type" msgstr "cast discards qualifiers from pointer target type" #. type: cindex #, no-wrap msgid "assignment discards qualifiers" msgstr "assignment discards qualifiers" #. type: cindex #, no-wrap msgid "initialization discards qualifiers" msgstr "initialization discards qualifiers" #. type: cindex #, no-wrap msgid "return discards qualifiers" msgstr "return discards qualifiers" #. type: table msgid "" "These warnings occur when a pointer is used incorrectly, violating a type " "qualifier such as @code{const}. Data accessed through a pointer marked as " "@code{const} should not be modified, and the pointer itself can only be " "assigned to other pointers that are also marked @code{const}." msgstr "" "Estos avisos ocurren cuando un puntero es usado de manera incorrecta, \n" "violando un calificador de tipo tal como @code{const}. Los datos \n" "accedidos a trav@'es de un puntero marcado como @code{const} no se \n" "modificar@'a, y el puntero en s@'{@dotless{i}} s@'olo puede ser asignado a " "otros \n" "punteros que tambi@'en son marcados como @code{const}." #. type: example #, no-wrap msgid "@verbatiminclude msg-const.c\n" msgstr "@verbatiminclude msg-const.es.c\n" #. type: table msgid "" "This program attempts to modify constant data, and to discard the @code" "{const} property of the argument @code{s} in the return value." msgstr "" "Este programa intenta modificar datos constantes, y descartar la\n" "propiedad @code{const} del argumento @code{s} en el valor\n" "devuelto." #. type: cindex #, no-wrap msgid "initializer element is not a constant" msgstr "initializer element is not a constant" #. type: table msgid "" "In C, global variables can only be initialized with constants, such as " "numeric values, @code{NULL} or fixed strings. This error occurs if a non-" "constant value is used." msgstr "" "En C, las variables globales solo pueden ser inicializadas con constantes,\n" "tales como valores num@'ericos, @code{NULL} o cadenas. Este error ocurre si\n" "un valor no constante es usado." #. type: example #, no-wrap msgid "@verbatiminclude msg-init.c\n" msgstr "@verbatiminclude msg-init.es.c\n" #. type: table msgid "" "This program attempts to initialize two variables from other variables. In " "particular, the stream @code{stdout} is not required to be a constant by the " "C standard (although on some systems it is a constant). Note that non-" "constant initializers are allowed in C++." msgstr "" "Este programa intenta inicializar dos variables desde otras variables. En\n" "particular, no se requiere al flujo @code{stdout} ser una constante por el\n" "est@'andar de C (aunque en algunos sistemas es una constante). N@'otese que\n" "inicializadore no constantes son permitidos en C++." #. type: cindex #, no-wrap msgid "linker, error messages" msgstr "enlazador, mensajes de error" #. type: item #, no-wrap msgid "file not recognized: File format not recognized" msgstr "file not recognized: File format not recognized" #. type: cindex #, no-wrap msgid "file not recognized" msgstr "file not recognized" #. type: cindex #, no-wrap msgid "file format not recognized" msgstr "file format not recognized" #. type: table msgid "" "GCC uses the extension of a file, such as @file{.c} or @file{.cc}, to " "determine its content. If the extension is missing GCC cannot recognize the " "file type and will give this error." msgstr "" "GCC usa la extensi@'on de un fichero, tal como @file{.c} o @file{.cc},\n" "para determinar su contenido. Si no hay extensi@'on GCC no puede reconocer\n" "el tipo de fichero y dar@'a este error." #. type: example #, no-wrap msgid "@verbatiminclude msg-ext\n" msgstr "@verbatiminclude msg-ext\n" #. type: table msgid "" "If the program above is saved in a file @file{hello} without any extension " "then compiling it will give the error:" msgstr "" "Si el programa de debajo est@'a guardado en un fichero @file{hola} sin\n" "extensi@'on, entonces al compilarlo dar@'a el siguiente error:" #. type: example #, no-wrap msgid "" "$ gcc -Wall hello\n" "hello: file not recognized: File format not \n" "recognized\n" "collect2: ld returned 1 exit status\n" msgstr "" "$ gcc -Wall hola\n" "hola: file not recognized: File format not\n" "recognized\n" "collect2: ld returned 1 exit status" #. type: table msgid "" "The solution is to rename the file to the correct extension, in this case " "@file{hello.c}." msgstr "" "La soluci@'on es renombrar el fichero para la correcta extensi@'on,\n" "en este caso @file{hola.es.c}." #. type: item #, no-wrap msgid "undefined reference to `foo'" msgstr "undefined reference to `foo'" #. type: cindex #, no-wrap msgid "collect2: ld returned 1 exit status" msgstr "collect2: ld returned 1 exit status" #. type: cindex #, no-wrap msgid "ld returned 1 exit status" msgstr "ld returned 1 exit status" #. type: table msgid "" "This error occurs when a program uses a function or variable which is not " "defined in any of the object files or libraries supplied to the linker. It " "can be caused by a missing library or the use of an incorrect name. In the " "error message above, the program @file{collect2} is part of the linker." msgstr "" "Este error ocurre cuando un programa usa una funci@'on o variable que no\n" "est@'a definida en cualquiera de los ficheros objeto o librer@'{@dotless{i}}" "as\n" "suministradas para el enlazador. Esto puede ser causado por una\n" "librer@'{@dotless{i}}a perdida o el uso de un nombre incorrecto. En el " "mensaje de\n" "error de debajo, el programa @file{collect2} es parte del enlazador." #. type: example #, no-wrap msgid "@verbatiminclude msg-undef.c\n" msgstr "@verbatiminclude msg-undef.es.c\n" #. type: table msgid "" "If this program is compiled without linking to a library or object file " "containing the function @code{foo()} there will be an undefined reference " "error." msgstr "" "Si este programa est@'a compilado sin ser enlazado a una librer@'{@dotless" "{i}}a o fichero\n" "objeto conteniendo la funci@'on @code{foo()} habr@'a una indefinida \n" "referencia de error." #. type: item #, no-wrap msgid "/usr/lib/crt1.o(.text+0x18): undefined reference to `main'" msgstr "/usr/lib/crt1.o(.text+0x18): undefined reference to `main'" #. type: cindex #, no-wrap msgid "undefined reference to 'main'" msgstr "referencia indefinida a 'main'" #. type: table msgid "" "This error is a special case of the error above, when the missing function " "is @code{main}. In C and C++, every program must have a @code{main} " "function (where execution starts). When compiling an individual source file " "without a @code{main} function, use the option @option{-c} (@pxref{Creating " "object files from source files})." msgstr "" "Este error es un caso especial del error de debajo, cuando la funci@'on\n" "perdida es @code{main}. En C y C++, cada programa debe tener una funci@'on\n" " @code{main} (d@'onde la ejecuci@'on comienza). Cuando se compila un " "fichero\n" "fuente individual sin una funci@'on @code{main}, usa la opci@'on @option{-" "c}\n" "(@pxref{Creando archivos objeto desde archivos fuente})." #. type: cindex #, no-wrap msgid "runtime error messages" msgstr "Mensajes de error en tiempo de ejecuci@'on" #. type: item #, no-wrap msgid "error while loading shared libraries:" msgstr "error while loading shared libraries:" #. type: itemx #, no-wrap msgid "cannot open shared object file: No such file or directory" msgstr "cannot open shared object file: No such file or directory" #. type: table msgid "" "The program uses shared libraries, but the necessary shared library files " "cannot be found by the dynamic linker when the program starts. The search " "path for shared libraries is controlled by the environment variable @env" "{LD_LIBRARY_PATH} (@pxref{Shared libraries and static libraries})." msgstr "" "El programa usa librer@'{@dotless{i}}as compartidas, pero los\n" "necesarios ficheros de las librer@'{@dotless{i}}as compartidas no\n" "pueden ser encontrados por el enlazador din@'amico cuando el programa\n" "comienza. La ruta de b@'usqueda para las librer@'{@dotless{i}}as\n" "compartidas es controlada por la variable de entorno\n" "@env{LD_LIBRARY_PATH} (@pxref{Librer@'{@dotless{i}}as compartidas y\n" "librer@'{@dotless{i}}as est@'aticas}).\n" #. type: item #, no-wrap msgid "Segmentation fault" msgstr "Segmentation fault" #. type: itemx #, no-wrap msgid "Bus error" msgstr "Bus error" #. type: cindex #, no-wrap msgid "bus error" msgstr "bus error" #. type: cindex #, no-wrap msgid "uninitialized pointer" msgstr "puntero no inicializado" #. type: table msgid "These runtime messages indicate a memory access error." msgstr "" "Estos mensajes en tiempo de ejecuci@'on indican un error de acceso a memoria" #. type: table msgid "Common causes include:" msgstr "Causas comunes incluyen:" #. type: item #, no-wrap msgid "dereferencing a null pointer or uninitialized pointer" msgstr "desreferenciando un puntero nulo o un puntero no inicializado" #. type: item #, no-wrap msgid "out-of-bounds array access" msgstr "acceso al array fuera de los l@'{@dotless{i}}mites" #. type: item #, no-wrap msgid "incorrect use of @code{malloc}, @code{free} and related functions" msgstr "incorrecto uso de @code{malloc}, @code{free} y funciones relacionadas" #. type: item #, no-wrap msgid "use of @code{scanf} with invalid arguments" msgstr "uso de @code{scanf} con argumentos no v@'alidos" #. type: table msgid "" "There is a subtle difference between segmentation faults and bus errors. A " "segmentation fault occurs when a process tries to access memory protected by " "the operating system. A bus error occurs when valid memory is accessed in " "an incorrect way (for example, trying to read an @dfn{unaligned} value on " "architectures where values must be aligned with 4-byte offsets)." msgstr "" "Hay una sutil diferencia entre fallos de segmentaci@'on y errores de\n" "bus. Un fallo de segmentaci@'on ocurre cuando un proceso intenta\n" "acceder a memoria protegida por el sistema operativo. Un error de bus\n" "ocurre cuando memoria v@'alida es accedida de un modo incorrecto (por\n" "ejemplo, intentando leer un @dfn{no alineado} valor en arquitecturas\n" "d@'onde los valores deben ser alineados con 4-bytes)." #. type: cindex #, no-wrap msgid "floating point exception" msgstr "floating point exception" #. type: table msgid "" "This runtime error is caused by an arithmetic exception, such as division by " "zero, overflow, underflow or an invalid operation (e.g. taking the square " "root of @math{-1}). The operating system determines which conditions " "produce this error. On GNU systems, the functions @code{feenableexcept} and " "@code{fedisableexcept} can be used to trap or mask each type of exception." msgstr "" "Este error en tiempo de ejecuci@'on es causado por una excepci@'on " "aritm@'etica, tal como\n" "divisi@'on por cero, desbordamiento, por exceso y por defecto o una\n" "operaci@'on no v@'alida (p.e. la ra@'{@dotless{i}}z cuadrada de\n" "@math{-1}). El sistema operativo determina qu@'e condiciones producen\n" "este error. En sistemas GNU, las funciones @code{feenableexcept} y\n" "@code{fedisableexcept} pueden ser usadas para capturar o enmascarar\n" "cada tipo de excepci@'on." #. type: item #, no-wrap msgid "Illegal instruction" msgstr "Illegal instruction" #. type: table msgid "" "This error is produced by the operating system when an illegal machine " "instruction is encountered. It occurs when code has been compiled for one " "specific architecture and run on another." msgstr "" "Este error es producido por el sistema operativo cuando se encuentra\n" "una instrucci@'on m@'aquina ilegal. Esto ocurre cuando el c@'odigo ha\n" "sido compilado para una arquitectura espec@'{@dotless{i}}fica y se\n" "ejecuta en otra." #. type: item #, no-wrap msgid "function declaration isn't a prototype" msgstr "function declaration isn't a prototype" #. type: item #, no-wrap msgid "comparison between signed and unsigned" msgstr "comparison between signed and unsigned" #. type: item #, no-wrap msgid "too few arguments for format" msgstr "too few arguments for format" #. type: item #, no-wrap msgid "... used with ... format" msgstr "... used with ... format" #. type: item #, no-wrap msgid "declared inside parameter list" msgstr "declared inside parameter list" #. type: item #, no-wrap msgid "may not appear in macro parameter list" msgstr "may not appear in macro parameter list" #. type: item #, no-wrap msgid "? without following :" msgstr "? without following :" #. type: itemx #, no-wrap msgid ": without preceding ?" msgstr ": without preceding ?" #. type: itemx #, no-wrap msgid "signed and unsigned type in conditional expression" msgstr "signed and unsigned type in conditional expression" #. type: item #, no-wrap msgid "conflicting types for ...." msgstr "conflicting types for ...." #. type: item #, no-wrap msgid "/* within comment" msgstr "/* within comment" #. type: item #, no-wrap msgid "type defaults to `int' in declaration of ..." msgstr "type defaults to `int' in declaration of ..." #. type: item #, no-wrap msgid "data definition has no type or storage class" msgstr "data definition has no type or storage class" #. type: item #, no-wrap msgid "pointer targets differ in signedness" msgstr "pointer targets differ in signedness" #. type: item #, no-wrap msgid "storage size of ... isn't known" msgstr "storage size of ... isn't known" #. type: item #, no-wrap msgid "integer overflow in expression" msgstr "integer overflow in expression" #. type: item #, no-wrap msgid "no previous prototype for ..." msgstr "no previous prototype for ..." #. type: item #, no-wrap msgid "redundant redeclaration of ..." msgstr "redundant redeclaration of ..." #. type: item #, no-wrap msgid "array subscript has type char" msgstr "array subscript has type char" #. type: item #, no-wrap msgid "array subscript is not an integer" msgstr "array subscript is not an integer" #. type: item #, no-wrap msgid "cast from pointer to integer of different size" msgstr "cast from pointer to integer of different size" #. type: item #, no-wrap msgid "return type defaults to int" msgstr "return type defaults to int" #. type: item #, no-wrap msgid "missing braces around initializer" msgstr "missing braces around initializer" #. type: item #, no-wrap msgid "unterminated comment" msgstr "unterminated comment" #. type: item #, no-wrap msgid "suggest explicit braces to avoid ambiguous else" msgstr "suggest explicit braces to avoid ambiguous else" #. type: item #, no-wrap msgid "invalid lvalue in assignment" msgstr "invalid lvalue in assignment" #. type: item #, no-wrap msgid "function returns address of local variable" msgstr "function returns address of local variable" #. type: item #, no-wrap msgid "comparison is always false due to limited range of datatype" msgstr "comparison is always false due to limited range of datatype" #. type: itemx #, no-wrap msgid "comparison is always true due to limited range of datatype" msgstr "comparison is always true due to limited range of datatype" #. type: table #, no-wrap msgid "" "can be caused by signed vs unsigned char\n" "\n" msgstr "puede ser causado por con signo versus sin signo" #. type: item #, no-wrap msgid "excess elements in scalar initializer" msgstr "excess elements in scalar initializer" #. type: item #, no-wrap msgid "excess elements in struct initializer" msgstr "excess elements in struct initializer" #. type: item #, no-wrap msgid "excess elements in array initializer" msgstr "excess elements in array initializer" #. type: item #, no-wrap msgid "invalid operands to binary ..." msgstr "invalid operands to binary ..." #. type: item #, no-wrap msgid "return with a value in function returning void" msgstr "return with a value in function returning void" #. type: item #, no-wrap msgid "... is a GCC extension" msgstr "... is a GCC extension" #. type: item #, no-wrap msgid "empty body in an if-statement" msgstr "empty body in an if-statement" #. type: item #, no-wrap msgid "empty body in an else-statement" msgstr "empty body in an else-statement" #. type: item #, no-wrap msgid "invalid storage class for function ..." msgstr "invalid storage class for function ..." #. type: item #, no-wrap msgid "unknown escape sequence ..." msgstr "unknown escape sequence ..." #. type: item #, no-wrap msgid "variable or field ... declared void" msgstr "variable or field ... declared void" #. type: item #, no-wrap msgid "argument ... doesn't match prototype" msgstr "argument ... doesn't match prototype" #. type: item #, no-wrap msgid "subscripted value is neither array nor pointer" msgstr "subscripted value is neither array nor pointer" #. type: item #, no-wrap msgid "braces around scalar initializer" msgstr "braces around scalar initializer" #. type: item #, no-wrap msgid "number of arguments doesn't match prototype" msgstr "number of arguments doesn't match prototype" #. type: item #, no-wrap msgid "large integer implicitly truncated to unsigned type" msgstr "large integer implicitly truncated to unsigned type" #. type: item #, no-wrap msgid "integer constant is too large for ... type" msgstr "integer constant is too large for ... type" #. type: item #, no-wrap msgid "overflow in implicit constant conversion" msgstr "overflow in implicit constant conversion" #. type: item #, no-wrap msgid "nested extern declaration of ..." msgstr "nested extern declaration of ..." #. type: item #, no-wrap msgid "parameter has incomplete type" msgstr "parameter has incomplete type" #. type: item #, no-wrap msgid "return with no value, in function returning non-void" msgstr "return with no value, in function returning non-void" #. type: item #, no-wrap msgid "no return statement in function returning non-void" msgstr "no return statement in function returning non-void" #. type: item #, no-wrap msgid "this function may return with or without a value" msgstr "this function may return with or without a value" #. type: item #, no-wrap msgid "... with different width due to prototype" msgstr "... with different width due to prototype" #. type: item #, no-wrap msgid "declaration of ... shadows a global declaration" msgstr "declaration of ... shadows a global declaration" #. type: item #, no-wrap msgid "declaration of ... shadows a previous local declaration" msgstr "declaration of ... shadows a previous local declaration" #. type: item #, no-wrap msgid "... of read-only variable" msgstr "... of read-only variable" #. type: item #, no-wrap msgid "initializer element is not computable at load time" msgstr "initializer element is not computable at load time" #. type: item #, no-wrap msgid "empty character constant" msgstr "empty character constant" #. type: item #, no-wrap msgid "... has an incomplete type" msgstr "... has an incomplete type" #. type: item #, no-wrap msgid "integer constant is so large that it is unsigned" msgstr "integer constant is so large that it is unsigned" #. type: item #, no-wrap msgid "backslash and newline separated by space" msgstr "backslash and newline separated by space" #. type: item #, no-wrap msgid "array size missing in ..." msgstr "array size missing in ..." #. type: item #, no-wrap msgid "unrecognized format specifier ..." msgstr "unrecognized format specifier ..." #. type: item #, no-wrap msgid "... as unsigned due to prototype" msgstr "... as unsigned due to prototype" #. type: item #, no-wrap msgid "... as signed due to prototype" msgstr "... as signed due to prototype" #. type: item #, no-wrap msgid "overflow in constant expression" msgstr "overflow in constant expression" #. type: item #, no-wrap msgid "floating point overflow in expression" msgstr "floating point overflow in expression" #. type: item #, no-wrap msgid "for loop initial declaration used outside C99 mode" msgstr "for loop initial declaration used outside C99 mode" #. type: item #, no-wrap msgid "switch quantity is not an integer" msgstr "switch quantity is not an integer" #. type: item #, no-wrap msgid "too many decimal points in number" msgstr "too many decimal points in number" #. type: item #, no-wrap msgid "storage size of ... isn't constant" msgstr "storage size of ... isn't constant" #. type: item #, no-wrap msgid "as floating rather than integer due to prototype" msgstr "as floating rather than integer due to prototype" #. type: item #, no-wrap msgid "invalid conversion from ... to ..." msgstr "invalid conversion from ... to ..." #. type: item #, no-wrap msgid "no matching function for call to ..." msgstr "no matching function for call to ..." #. type: item #, no-wrap msgid "shadow..." msgstr "shadow..." #. type: cindex #, no-wrap msgid "getting help" msgstr "obteniendo ayuda" #. type: Plain text msgid "" "If you encounter a problem not covered by this introduction, there are " "several reference manuals which describe GCC and language-related topics in " "more detail (@pxref{Further reading}). These manuals contain answers to " "common questions, and careful study of them will usually yield a solution." msgstr "" "Si encuentras un problema no cubierto por esta introducci@'on, hay varios\n" "manuales de referencia que describen GCC y asuntos relacionados con el \n" "lenguaje en m@'as detalle (@pxref{Lectura adicional}). Estos manuales\n" "contienen respuestas a preguntas comunes, y un cuidadoso estudio de\n" "@'estas normalmente producir@'an una soluci@'on." #. type: Plain text msgid "" "Alternatively, there are many companies and consultants who offer commercial " "support for programming matters related to GCC on an hourly or ongoing " "basis. For businesses this can be a cost-effective way to obtain high-" "quality support." msgstr "" "De otro modo, hay muchas compa@~n@'{@dotless{i}}as y consultores quienes " "ofrecen soporte\n" "comercial para cuestiones de programaci@'on relativas a GCC por horas o de\n" "forma cont@'{@dotless{i}}nua. En los negocios esto puede ser un camino de " "costes efectivo\n" "para obtener soporte de alta calidad." #. type: cindex #, no-wrap msgid "support, commercial" msgstr "comercial, soporte" #. type: cindex #, no-wrap msgid "commercial support" msgstr "soporte comercial" #. type: Plain text msgid "" "A directory of free software support companies and their current rates can " "be found on the GNU Project website.@footnote{@uref{http://www.gnu.org/prep/" "service.html}} With free software, commercial support is available in a free " "market---service companies compete in quality and price, and users are not " "tied to any particular one. In contrast, support for proprietary software " "is usually only available from the original vendor." msgstr "" "Un directorio de compa@~n@'{@dotless{i}}as que dan soporte al software\n" "libre y sus precios actualizados puede ser encontrado en el sitio\n" "web@footnote{@uref{http://www.gnu.org/prep/service.html}} del Proyecto\n" "GNU. Con software libre, el soporte comercial est@'a disponible en un\n" "mercado libre ---compa@~n@'{@dotless{i}}as de servicios compiten en\n" "calidad y precio, y los usuarios no est@'an atados a una\n" "determinada. En contraste, el soporte para el software privativo\n" "est@'a normalmente s@'olo disponible desde el vendedor original." #. type: cindex #, no-wrap msgid "enhancements, to GCC" msgstr "mejoras de GCC" #. type: Plain text msgid "" "A higher-level of commercial support for GCC is available from companies " "involved in the development of the GNU compiler toolchain itself. A listing " "of these companies can be found in the ``Development Companies'' section of " "the publisher's webpage for this book.@footnote{@uref{http://www.network-" "theory.co.uk/gcc/intro/}} These companies can provide services such as " "extending GCC to generate code for new CPUs or fixing bugs in the compiler." msgstr "" "Un soporte comercial de alto nivel para GCC est@'a disponible desde\n" "compa@~n@'{@dotless{i}}as involucradas en el desarrollo del conjunto\n" "de herramientas del compilador de GNU por s@'{@dotless{i}} mismo. Un\n" "listado de estas compa@~n@'{@dotless{i}}as puede ser encontrado en la\n" "secci@'on de ``Compa@~n@'{@dotless{i}}as de Desarrollo'' de la\n" "p@'agina web de la editorial para este\n" "libro.@footnote{@uref{http://www.network-theory.co.uk/gcc/intro/}}\n" "Estas compa@~n@'{@dotless{i}}as pueden proporcionar servicios tales\n" "como extender GCC para generar c@'odigo para nuevos procesadores o\n" "para arreglar errores encontrados en el compilador. " #. type: cindex #, no-wrap msgid "manuals, for GNU software" msgstr "manuales para software GNU" #. type: Plain text msgid "" "The definitive guide to GCC is the official reference manual, ``@cite{Using " "GCC}'', published by GNU Press:" msgstr "" "La gu@'{@dotless{i}}a definitiva para GCC es el manual oficial de " "referencia, \n" "``@cite{Using GCC}'', publicado por GNU Press:" #. type: cindex #, no-wrap msgid "Using GCC (Reference Manual)" msgstr "Usando GCC (Manual de Referencia)" #. type: cindex #, no-wrap msgid "GNU Compilers, Reference Manual" msgstr "Compiladores GNU, Manual de Referencia" #. type: quotation msgid "" "@cite{Using GCC (for GCC version 3.3.1)} by Richard M. Stallman and the GCC " "Developer Community (Published by GNU Press, ISBN 1-882114-39-6)" msgstr "" "@cite{Using GCC (for GCC version 3.3.1)} por Richard M. Stallman y the GCC " "Developer Community (Publicado por GNU Press, ISBN 1-882114-39-6)" #. type: Plain text msgid "" "This manual is essential for anyone working with GCC because it describes " "every option in detail. Note that the manual is updated when new releases " "of GCC become available, so the ISBN number may change in the future." msgstr "" "Este manual es esencial para cualquiera que trabaje con GCC porque describe\n" "cada opci@'on en detalle. N@'otese que el manual est@'a actualizado cuando " "nuevas versiones\n" "de GCC llegan a estar disponibles, as@'{@dotless{i}} el n@'umero ISBN puede " "cambiar en el futuro.\n" #. type: Plain text msgid "" "If you are new to programming with GCC you will also want to learn how to " "use the GNU Debugger GDB, and how to compile large programs easily with GNU " "Make. These tools are described in the following manuals:" msgstr "" "Si eres nuevo programando con GCC tambi@'en querr@'as aprender a usar\n" "el Depurador de GNU GDB, y a c@'omo compilar largos programas f@'acilmente " "con\n" "GNU Make. @'Estas herramientas son descritas en los siguientes manuales: " #. type: cindex #, no-wrap msgid "GNU GDB Manual" msgstr "Manual de GDB" #. type: cindex #, no-wrap msgid "GNU Make Manual" msgstr "Manual de GNU Make" #. type: quotation msgid "" "@cite{Debugging with GDB: The GNU Source-Level Debugger} by Richard M. " "Stallman, Roland Pesch, Stan Shebs, et al. (Published by GNU Press, ISBN " "1-882114-88-4)" msgstr "" "@cite{Debugging with GDB: The GNU Source-Level Debugger} por Richard M. " "Stallman, Roland Pesch, Stan Shebs, et al. (Publicado por GNU Press, ISBN " "1-882114-88-4)" #. type: quotation msgid "" "@cite{GNU Make: A Program for Directing Recompilation} by Richard M. " "Stallman and Roland McGrath (Published by GNU Press, ISBN 1-882114-82-5)" msgstr "" "@cite{GNU Make: A Program for Directing Recompilation} por Richard M. " "Stallman y Roland McGrath (Publicado por GNU Press, ISBN 1-882114-82-5)" #. type: Plain text msgid "" "For effective C programming it is also essential to have a good knowledge of " "the C standard library. The following manual documents all the functions in " "the GNU C Library:" msgstr "" "Para una efectiva programaci@'on en C es tambi@'en esencial tener\n" "buenos conocimientos de la librer@'{@dotless{i}}a est@'andar de C. El\n" "siguientes manual documenta todas las funciones en la GNU C Library:" #. type: cindex #, no-wrap msgid "GNU C Library Reference Manual" msgstr "Manual de Referencia de la GNU C Library" #. type: quotation msgid "" "@cite{The GNU C Library Reference Manual} by Sandra Loosemore with Richard " "M. Stallman, et al (2 vols) (Published by GNU Press, ISBN 1-882114-22-1 and " "1-882114-24-8)" msgstr "" "@cite{The GNU C Library Reference Manual} por Sandra Loosemore con Richard " "M. Stallman, et al (2 vols) (Publicado por GNU Press, ISBN 1-882114-22-1 y " "1-882114-24-8)" #. type: cindex #, no-wrap msgid "GNU Press, manuals" msgstr "manuales GNU Press" #. type: Plain text msgid "" "Be sure to check the website @uref{http://www.gnupress.org/} for the latest " "printed editions of manuals published by GNU Press. The manuals can be " "purchased online using a credit card at the FSF website@footnote{@uref" "{http://order.fsf.org/}} in addition to being available for order through " "most bookstores using the ISBNs. Manuals published by GNU Press raise funds " "for the Free Software Foundation and the GNU Project." msgstr "" "Aseg@'urate de visitar el sitio web @uref{http://www.gnupress.org/} para las " "@'ultimas\n" "ediciones impresas de manuales publicados por GNU Press. Los manuales pueden " "ser\n" "adquiridos online usando una tarjeta de cr@'edito en el sitio web de la \n" "FSF@footnote{@uref{http://order.fsf.org/}} adem@'as de estar disponbles para " "su compra\n" "a trav@'es de la mayor@'{@dotless{i}}a de las librer@'{@dotless{i}}as usando " "ISBN. Manuales publicados por GNU Press\n" "financian la Free Software Foundation y el Proyecto GNU." #. type: Plain text msgid "" "Information about shell commands, environment variables and shell-quoting " "rules can be found in the following book:" msgstr "" "Informaci@'on acerca de comandos de shell, variables de entorno y reglas " "de \n" "comillas en shell puede ser encontrada en el siguiente libro:" #. type: quotation msgid "" "@uref{http://www.network-theory.co.uk/bash/manual/,@cite{The GNU Bash " "Reference Manual},@cite{The GNU Bash Reference Manual}} by Chet Ramey and " "Brian Fox (Published by Network Theory Ltd, ISBN 0-9541617-7-7)" msgstr "" "@uref{http://www.network-theory.co.uk/bash/manual/,@cite{The GNU Bash " "Reference Manual},@cite{The GNU Bash Reference Manual}} por Chet Ramey y " "Brian Fox (Publicados por Network Theory Ltd, ISBN 0-9541617-7-7)" #. type: Plain text msgid "" "Other GNU Manuals mentioned in this book (such as @cite{GNU gprof---The GNU " "Profiler} and @cite{The GNU Binutils Manual}) were not available in print at " "the time this book went to press. Links to online copies can be found at " "the publisher's webpage for this book.@footnote{@uref{http://www.network-" "theory.co.uk/gcc/intro/}}" msgstr "" "Otros Manuales de GNU mencionados en este libro (tal como @cite{GNU\n" "gprof ---The GNU Profiler} y @cite{The GNU Binutils Manual} no estaban\n" "disponibles en forma impresa en el momento en que este libro fu@'e a\n" "imprenta. Enlaces a copias online pueden ser encontradas en la\n" "p@'agina web de la editorial para esto\n" "book.@footnote{@uref{http://www.network-theory.co.uk/gcc/intro/}} " #. type: Plain text msgid "" "The official GNU Project webpage for GCC can be found on the GNU website at " "@uref{http://www.gnu.org/software/gcc/}. This includes a list of frequently " "asked questions, as well as the GCC bug tracking database and a lot of other " "useful information about GCC." msgstr "" "La p@'agina web oficial del Proyecto GNU para GCC puede ser encontrado en \n" "@uref{http://www.gnu.org/software/gcc/}. @'Este sitio incluye una lista de \n" "preguntas frecuentes, as@'{@dotless{i}} como la base de datos de errores y " "gran cantidad de\n" "otra informaci@'on @'util acerca de GCC." #. type: Plain text msgid "" "There are many books about the C and C++ languages themselves. Two of the " "standard references are:" msgstr "" "Hay muchos libros acerca de los lenguajes C y C++. Dos de los\n" "est@'andares de referencia son:" #. type: cindex #, no-wrap msgid "reference books" msgstr "libros de referencia" #. type: cindex #, no-wrap msgid "C language, further reading" msgstr "m@'as lectura acerca del lenguaje C" #. type: cindex #, no-wrap msgid "books, further reading" msgstr "libros, lectura adicional" #. type: cindex #, no-wrap msgid "Kernighan and Ritchie, @cite{The C Programming Language}" msgstr "Kernighan and Ritchie, @cite{The C Programming Language}" #. type: quotation msgid "" "@cite{The C Programming Language} (ANSI edition) Brian W. Kernighan, Dennis " "Ritchie (ISBN 0-13110362-8)" msgstr "" "@cite{The C Programming Language} (ANSI edition) Brian W. Kernighan, " "Dennis\n" "Ritchie (ISBN 0-13110362-8)" #. type: quotation msgid "" "@cite{The C++ Programming Language} (3rd edition) Bjarne Stroustrup (ISBN " "0-20188954-4)" msgstr "" "@cite{The C++ Programming Language} (3rd edition) Bjarne Stroustrup (ISBN " "0-20188954-4)" #. type: cindex #, no-wrap msgid "standards, C, C++ and IEEE arithmetic" msgstr "est@'andares C, C++ y aritm@'etica del IEEE" #. type: cindex #, no-wrap msgid "IEEE arithmetic standard, printed form" msgstr "forma impresa del est@'andar de aritm@'etica del IEEE" #. type: cindex #, no-wrap msgid "C/C++ languages, standards in printed form" msgstr "C y C++ est@'andares en forma impresa" #. type: cindex #, no-wrap msgid "ISO standards for C/C++ languages, available as books" msgstr "los est@'andares ISO para los lenguajes C y C++, disponibles como libros" #. type: cindex #, no-wrap msgid "ANSI standards for C/C++ languages, available as books" msgstr "los est@'andares ANSI para los lenguajes C y C++, disponibles como libros" #. type: Plain text msgid "" "Anyone using the C and C++ languages in a professional context should obtain " "a copy of the official language standards, which are also available as " "printed books:" msgstr "" "Cualquiera usando los lenguajes C y C++ en un contexto profesional " "obtendr@'a\n" "una copia de los est@'andares oficiales, que est@'an disponibles como libros " "impresos:" #. type: quotation msgid "" "@cite{The C Standard: Incorporating Technical Corrigendum 1} (Published by " "Wiley, ISBN 0-470-84573-2)" msgstr "" "@cite{The C Standard: Incorporating Technical Corrigendum 1} (Publicado por " "Wiley, ISBN 0-470-84573-2)" #. type: quotation msgid "@cite{The C++ Standard} (Published by Wiley, ISBN 0-470-84674-7)" msgstr "@cite{The C++ Standard} (Publicado por Wiley, ISBN 0-470-84674-7)" #. type: Plain text msgid "" "For reference, the C standard number is ISO/IEC 9899:1990, for the original " "C standard published in 1990 and implemented by GCC. A revised C standard " "ISO/IEC 9899:1999 (known as C99) was published in 1999, and this is mostly " "(but not yet fully) supported by GCC. The C++ standard is ISO/IEC 14882." msgstr "" "Por referencia, el n@'umero est@'andar C es ISO/IEC 9899:1990, para el " "original\n" "est@'andar C publicado en 1990 e implementado por GCC. Un est@'andar de C " "revisado\n" "ISO/IEC 9899:1999 (conocido como C99) fu@'e publicado en 1999, y @'este es " "mayoritariamente\n" "(pero todav@'{@dotless{i}}a no completamente) soportado por GCC. El " "est@'andar de C++ es ISO/IEC 14882." #. type: cindex #, no-wrap msgid "IEEE-754 standard" msgstr "est@'andar IEEE-754" #. type: Plain text msgid "" "The floating-point arithmetic standard IEEE-754 is important for any " "programs involving numerical computations. The standard is available " "commercially from the IEEE, and is also described in the following book:" msgstr "" "El est@'andar de aritm@'etica en coma flotante IEEE-754 es importante\n" "para cualquier programa involucrados en computaci@'on num@'erica. El\n" "est@'andar est@'a disponible de manera comercial desde el IEEE, y\n" "tambi@'en es descrito en el siguiente libro:" #. type: quotation msgid "" "@cite{Numerical Computing with IEEE Floating Point Arithmetic} by Michael " "Overton (Published by SIAM, ISBN 0-89871-482-6)." msgstr "" "@cite{Numerical Computing with IEEE Floating Point Arithmetic} por Michael\n" "Overton (Publicado por SIAM, ISBN 0-89871-482-6)." #. type: Plain text msgid "" "The book includes many examples to illustrate the rationale for the standard." msgstr "" "El libro incluye muchos ejemplos para ilustrar la raz@'on fundamental para " "el\n" "est@'andar." #. type: Plain text msgid "" "Many people have contributed to this book, and it is important to record " "their names here:" msgstr "" "Muchas personas han contribuido a este libro, y es importante recordar\n" "sus nombres aqu@'{@dotless{i}}:" #. type: Plain text msgid "" "Thanks to Gerald Pfeifer, for his careful reviewing and numerous suggestions " "for improving the book." msgstr "" "Gracias a Gerald Pfeifer, por su cuidadosa revisi@'on y numerosas " "sugerencias\n" "para mejorar el libro." #. type: Plain text msgid "" "Thanks to Andreas Jaeger, for information on AMD64 and multi-architecture " "support, and many helpful comments." msgstr "" "Gracias a Andreas Jaeger, por la informaci@'on acerca de AMD64 y soporte\n" "multi-arquitectura, y sus muchos @'utiles comentarios." #. type: Plain text msgid "" "Thanks to David Edelsohn, for information on the POWER/PowerPC series of " "processors." msgstr "" "Gracias a David Edelsohn, por la informaci@'on acerca de la serie de\n" "procesadores POWER/PowerPC." #. type: Plain text msgid "Thanks to Jamie Lokier, for research." msgstr "Gracias a Jamie Lokier, por investigar." #. type: Plain text msgid "" "Thanks to Martin Leisner, Mario Pernici, Stephen Compall and Nigel Lowry, " "for helpful corrections." msgstr "" "Gracias a Martin Leisner, Mario Pernici, Stephen Compall y Nigel\n" "Lowry, por sus @'utiles correcciones." #. type: Plain text msgid "Thanks to Gerard Jungman, for useful comments." msgstr "Gracias a Gerard Jungman, por sus @'utiles comentarios." #. type: Plain text msgid "" "Thanks to Steven Rubin, for generating the chip layout for the cover with " "Electric." msgstr "" "Gracias a Steven Rubin, por generar la imagen del chip para la\n" "cubierta con Electric." #. type: Plain text msgid "" "And most importantly, thanks to Richard Stallman, founder of the GNU " "Project, for writing GCC and making it free software." msgstr "" "Y de manera m@'as importante, gracias a Richard Stallman, fundador del\n" "Proyecto GNU, por escribir GCC y hacer que sea software libre." #. type: Plain text msgid "" "The GNU Compiler Collection is part of the GNU Project, launched in 1984 to " "develop a complete Unix-like operating system which is free software: the " "GNU system." msgstr "" "El GCC, GNU Compiller Collection (Colecci@'on de Compiladores de GNU)\n" "es parte del Proyecto GNU, lanzado en 1984 para desarrollar un sistema\n" "operativo Unix completo que es software libre: el sistema GNU." #. type: Plain text msgid "" "The Free Software Foundation (FSF) is a tax-exempt charity that raises funds " "for continuing work on the GNU Project. It is dedicated to promoting the " "right to use, study, copy, modify, and redistribute computer programs. One " "of the best ways to help the development of free software is to become an " "associate member of the Free Software Foundation, and pay regular dues to " "support their efforts." msgstr "" "La Free Software Foundation (FSF) es una organizaci@'on de caridad\n" "exenta de impuestos que recoge fondo para el continuo trabajo del\n" "Proyecto GNU. Est@'a dedicada a promover el derecho a usar, estudiar,\n" "copiar, modificar, y redistribuir programas de ordenador. Uno de los\n" "mejores caminos para ayudar al desarrollo del software libre es ser un\n" "miembro asociado a la Free Software Foundation, y pagar regularmente\n" "cuotas para dar soporte a sus esfuerzos." #. type: Plain text msgid "" "Associate members of the Free Software Foundation receive many benefits, " "including regular newsletters, admission to the FSF annual meeting, and " "discounts on books and CDROMs published by GNU Press. Membership dues are " "also tax deductible in the USA. For more information on becoming a member, " "visit the FSF website at @uref{http://www.fsf.org/}." msgstr "" "Los miembros asociados a la Free Software Foundation reciben muchos\n" "beneficios incluyendo noticias, admisi@'on a los encuentros anuales de\n" "la FSF, y descuentos en libros y CDROMs publicados por GNU Press. Los\n" "costes por ser miembro son deducibles de impuestos en Estados\n" "Unidos. Para m@'as informaci@'on acerca de c@'omo llegar a ser miembro\n" "visita el sitio web de la FSF en @uref{http://www.fsf.org/}." #. type: Plain text msgid "" "The Free Software Foundation Europe (FSFE) is a sister organisation of the " "Free Software Foundation. The FSFE is active in promoting free software at " "all levels in Europe. For an annual membership fee, individuals can join " "FSFE and support its work. Members receive a personalised GPG-compatible " "membership smartcard, allowing secure digital authentication of email and " "files, and gain access to the ``FSFE Fellowship'', an electronic community " "for software freedom. For more information, visit the FSFE website at @uref" "{http://www.fsfe.org/}." msgstr "" "La Free Software Foundation Europe (FSFE) es una organizaci@'on\n" "hermana de la Free Software Foundation. La FSFE es activa en la\n" "promoci@'on del software libre a todos los niveles en Europa. Por una\n" "cuota anual, se puede ser miembro de la FSFE y dar soporte a su\n" "trabajo. Los miembros reciben una tarjeta de miembro personalizada y\n" "compatible con GPG, permitiendo autenticaci@'on digital segura de\n" "correo electr@'onico y ficheros, y obtener acceso a la ``FSFE\n" "Fellowship'', una comunidad electr@'onica por la libertad del\n" "software. Para m@'as informaci@'on, visita el sitio web de la FSFE en\n" "@uref{http://www.fsfe.org/}." #. type: Plain text msgid "" "The @cite{Foundation for a Free Information Infrastructure (FFII)} is " "another important organization in Europe. FFII is not specific to free " "software, but works to defend the rights of all programmers and computer " "users against monopolies in the field of computing, such as patents on " "software. For more information about FFII, or to support their work with a " "donation, visit their website at @uref{http://www.ffii.org/}." msgstr "" "La @cite{Foundation for a Free Information Infrastructure (FFII)} es\n" "otra organizaci@'on importante en Europa. FFII no se dedica\n" "espec@'ificamente al software libre, pero trabaja para defender los\n" "derechos de todos los programadores y usuarios de ordenadores contra\n" "los monopolios en el campo de la computaci@'on, tales como patentes de\n" "software. Para m@'as informaci@'on acerca de FFII, o para dar soporte\n" "a su trabajo con una donaci@'on, visita su sitio web en\n" "@uref{http://www.ffii.org/}." #. type: unnumbered #, no-wrap msgid "GNU Free Documentation License" msgstr "Licencia para documentaci@'on libre GNU" #. type: center #, no-wrap msgid "Version 1.2, November 2002" msgstr "Version 1.2, November 2002" #. type: ifnotinfo msgid "@smallerfonts @rm" msgstr "@smallerfonts @rm" #. type: display #, no-wrap msgid "" "Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.\n" "51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\n" "\n" msgstr "" "Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.\n" "51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\n" "\n" #. type: display #, no-wrap msgid "" "Everyone is permitted to copy and distribute verbatim copies\n" "of this license document, but changing it is not allowed.\n" msgstr "" "Everyone is permitted to copy and distribute verbatim copies\n" "of this license document, but changing it is not allowed.\n" #. type: enumerate msgid "PREAMBLE" msgstr "PREAMBLE" #. type: enumerate msgid "" "The purpose of this License is to make a manual, textbook, or other " "functional and useful document @dfn{free} in the sense of freedom: to assure " "everyone the effective freedom to copy and redistribute it, with or without " "modifying it, either commercially or noncommercially. Secondarily, this " "License preserves for the author and publisher a way to get credit for their " "work, while not being considered responsible for modifications made by " "others." msgstr "" "The purpose of this License is to make a manual, textbook, or other " "functional and useful document @dfn{free} in the sense of freedom: to assure " "everyone the effective freedom to copy and redistribute it, with or without " "modifying it, either commercially or noncommercially. Secondarily, this " "License preserves for the author and publisher a way to get credit for their " "work, while not being considered responsible for modifications made by " "others." #. type: enumerate msgid "" "This License is a kind of ``copyleft'', which means that derivative works of " "the document must themselves be free in the same sense. It complements the " "GNU General Public License, which is a copyleft license designed for free " "software." msgstr "" "This License is a kind of ``copyleft'', which means that derivative works of " "the document must themselves be free in the same sense. It complements the " "GNU General Public License, which is a copyleft license designed for free " "software." #. type: enumerate msgid "" "We have designed this License in order to use it for manuals for free " "software, because free software needs free documentation: a free program " "should come with manuals providing the same freedoms that the software " "does. But this License is not limited to software manuals; it can be used " "for any textual work, regardless of subject matter or whether it is " "published as a printed book. We recommend this License principally for " "works whose purpose is instruction or reference." msgstr "" "We have designed this License in order to use it for manuals for free " "software, because free software needs free documentation: a free program " "should come with manuals providing the same freedoms that the software " "does. But this License is not limited to software manuals; it can be used " "for any textual work, regardless of subject matter or whether it is " "published as a printed book. We recommend this License principally for " "works whose purpose is instruction or reference." #. type: enumerate msgid "APPLICABILITY AND DEFINITIONS" msgstr "APPLICABILITY AND DEFINITIONS" #. type: enumerate msgid "" "This License applies to any manual or other work, in any medium, that " "contains a notice placed by the copyright holder saying it can be " "distributed under the terms of this License. Such a notice grants a world-" "wide, royalty-free license, unlimited in duration, to use that work under " "the conditions stated herein. The ``Document'', below, refers to any such " "manual or work. Any member of the public is a licensee, and is addressed as " "``you''. You accept the license if you copy, modify or distribute the work " "in a way requiring permission under copyright law." msgstr "" "This License applies to any manual or other work, in any medium, that " "contains a notice placed by the copyright holder saying it can be " "distributed under the terms of this License. Such a notice grants a world-" "wide, royalty-free license, unlimited in duration, to use that work under " "the conditions stated herein. The ``Document'', below, refers to any such " "manual or work. Any member of the public is a licensee, and is addressed as " "``you''. You accept the license if you copy, modify or distribute the work " "in a way requiring permission under copyright law." #. type: enumerate msgid "" "A ``Modified Version'' of the Document means any work containing the " "Document or a portion of it, either copied verbatim, or with modifications " "and/or translated into another language." msgstr "" "A ``Modified Version'' of the Document means any work containing the " "Document or a portion of it, either copied verbatim, or with modifications " "and/or translated into another language." #. type: enumerate msgid "" "A ``Secondary Section'' is a named appendix or a front-matter section of the " "Document that deals exclusively with the relationship of the publishers or " "authors of the Document to the Document's overall subject (or to related " "matters) and contains nothing that could fall directly within that overall " "subject. (Thus, if the Document is in part a textbook of mathematics, a " "Secondary Section may not explain any mathematics.) The relationship could " "be a matter of historical connection with the subject or with related " "matters, or of legal, commercial, philosophical, ethical or political " "position regarding them." msgstr "" "A ``Secondary Section'' is a named appendix or a front-matter section of the " "Document that deals exclusively with the relationship of the publishers or " "authors of the Document to the Document's overall subject (or to related " "matters) and contains nothing that could fall directly within that overall " "subject. (Thus, if the Document is in part a textbook of mathematics, a " "Secondary Section may not explain any mathematics.) The relationship could " "be a matter of historical connection with the subject or with related " "matters, or of legal, commercial, philosophical, ethical or political " "position regarding them." #. type: enumerate msgid "" "The ``Invariant Sections'' are certain Secondary Sections whose titles are " "designated, as being those of Invariant Sections, in the notice that says " "that the Document is released under this License. If a section does not fit " "the above definition of Secondary then it is not allowed to be designated as " "Invariant. The Document may contain zero Invariant Sections. If the " "Document does not identify any Invariant Sections then there are none." msgstr "" "The ``Invariant Sections'' are certain Secondary Sections whose titles are " "designated, as being those of Invariant Sections, in the notice that says " "that the Document is released under this License. If a section does not fit " "the above definition of Secondary then it is not allowed to be designated as " "Invariant. The Document may contain zero Invariant Sections. If the " "Document does not identify any Invariant Sections then there are none." #. type: enumerate msgid "" "The ``Cover Texts'' are certain short passages of text that are listed, as " "Front-Cover Texts or Back-Cover Texts, in the notice that says that the " "Document is released under this License. A Front-Cover Text may be at most " "5 words, and a Back-Cover Text may be at most 25 words." msgstr "" "The ``Cover Texts'' are certain short passages of text that are listed, as " "Front-Cover Texts or Back-Cover Texts, in the notice that says that the " "Document is released under this License. A Front-Cover Text may be at most " "5 words, and a Back-Cover Text may be at most 25 words." #. type: enumerate msgid "" "A ``Transparent'' copy of the Document means a machine-readable copy, " "represented in a format whose specification is available to the general " "public, that is suitable for revising the document straightforwardly with " "generic text editors or (for images composed of pixels) generic paint " "programs or (for drawings) some widely available drawing editor, and that is " "suitable for input to text formatters or for automatic translation to a " "variety of formats suitable for input to text formatters. A copy made in an " "otherwise Transparent file format whose markup, or absence of markup, has " "been arranged to thwart or discourage subsequent modification by readers is " "not Transparent. An image format is not Transparent if used for any " "substantial amount of text. A copy that is not ``Transparent'' is called " "``Opaque''." msgstr "" "A ``Transparent'' copy of the Document means a machine-readable copy, " "represented in a format whose specification is available to the general " "public, that is suitable for revising the document straightforwardly with " "generic text editors or (for images composed of pixels) generic paint " "programs or (for drawings) some widely available drawing editor, and that is " "suitable for input to text formatters or for automatic translation to a " "variety of formats suitable for input to text formatters. A copy made in an " "otherwise Transparent file format whose markup, or absence of markup, has " "been arranged to thwart or discourage subsequent modification by readers is " "not Transparent. An image format is not Transparent if used for any " "substantial amount of text. A copy that is not ``Transparent'' is called " "``Opaque''." #. type: enumerate msgid "" "Examples of suitable formats for Transparent copies include plain @sc{ascii} " "without markup, Texinfo input format, La@TeX{} input format, @acronym{SGML} " "or @acronym{XML} using a publicly available @acronym{DTD}, and standard-" "conforming simple @acronym{HTML}, PostScript or @acronym{PDF} designed for " "human modification. Examples of transparent image formats include @acronym" "{PNG}, @acronym{XCF} and @acronym{JPG}. Opaque formats include proprietary " "formats that can be read and edited only by proprietary word processors, " "@acronym{SGML} or @acronym{XML} for which the @acronym{DTD} and/or " "processing tools are not generally available, and the machine-generated " "@acronym{HTML}, PostScript or @acronym{PDF} produced by some word processors " "for output purposes only." msgstr "" "Examples of suitable formats for Transparent copies include plain @sc{ascii} " "without markup, Texinfo input format, La@TeX{} input format, @acronym{SGML} " "or @acronym{XML} using a publicly available @acronym{DTD}, and standard-" "conforming simple @acronym{HTML}, PostScript or @acronym{PDF} designed for " "human modification. Examples of transparent image formats include @acronym" "{PNG}, @acronym{XCF} and @acronym{JPG}. Opaque formats include proprietary " "formats that can be read and edited only by proprietary word processors, " "@acronym{SGML} or @acronym{XML} for which the @acronym{DTD} and/or " "processing tools are not generally available, and the machine-generated " "@acronym{HTML}, PostScript or @acronym{PDF} produced by some word processors " "for output purposes only." #. type: enumerate msgid "" "The ``Title Page'' means, for a printed book, the title page itself, plus " "such following pages as are needed to hold, legibly, the material this " "License requires to appear in the title page. For works in formats which do " "not have any title page as such, ``Title Page'' means the text near the most " "prominent appearance of the work's title, preceding the beginning of the " "body of the text." msgstr "" "The ``Title Page'' means, for a printed book, the title page itself, plus " "such following pages as are needed to hold, legibly, the material this " "License requires to appear in the title page. For works in formats which do " "not have any title page as such, ``Title Page'' means the text near the most " "prominent appearance of the work's title, preceding the beginning of the " "body of the text." #. type: enumerate msgid "" "A section ``Entitled XYZ'' means a named subunit of the Document whose title " "either is precisely XYZ or contains XYZ in parentheses following text that " "translates XYZ in another language. (Here XYZ stands for a specific section " "name mentioned below, such as ``Acknowledgements'', ``Dedications'', " "``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a " "section when you modify the Document means that it remains a section " "``Entitled XYZ'' according to this definition." msgstr "" "A section ``Entitled XYZ'' means a named subunit of the Document whose title " "either is precisely XYZ or contains XYZ in parentheses following text that " "translates XYZ in another language. (Here XYZ stands for a specific section " "name mentioned below, such as ``Acknowledgements'', ``Dedications'', " "``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a " "section when you modify the Document means that it remains a section " "``Entitled XYZ'' according to this definition." #. type: enumerate msgid "" "The Document may include Warranty Disclaimers next to the notice which " "states that this License applies to the Document. These Warranty " "Disclaimers are considered to be included by reference in this License, but " "only as regards disclaiming warranties: any other implication that these " "Warranty Disclaimers may have is void and has no effect on the meaning of " "this License." msgstr "" "The Document may include Warranty Disclaimers next to the notice which " "states that this License applies to the Document. These Warranty " "Disclaimers are considered to be included by reference in this License, but " "only as regards disclaiming warranties: any other implication that these " "Warranty Disclaimers may have is void and has no effect on the meaning of " "this License." #. type: enumerate msgid "VERBATIM COPYING" msgstr "VERBATIM COPYING" #. type: enumerate msgid "" "You may copy and distribute the Document in any medium, either commercially " "or noncommercially, provided that this License, the copyright notices, and " "the license notice saying this License applies to the Document are " "reproduced in all copies, and that you add no other conditions whatsoever to " "those of this License. You may not use technical measures to obstruct or " "control the reading or further copying of the copies you make or " "distribute. However, you may accept compensation in exchange for copies. " "If you distribute a large enough number of copies you must also follow the " "conditions in section 3." msgstr "" "You may copy and distribute the Document in any medium, either commercially " "or noncommercially, provided that this License, the copyright notices, and " "the license notice saying this License applies to the Document are " "reproduced in all copies, and that you add no other conditions whatsoever to " "those of this License. You may not use technical measures to obstruct or " "control the reading or further copying of the copies you make or " "distribute. However, you may accept compensation in exchange for copies. " "If you distribute a large enough number of copies you must also follow the " "conditions in section 3." #. type: enumerate msgid "" "You may also lend copies, under the same conditions stated above, and you " "may publicly display copies." msgstr "" "You may also lend copies, under the same conditions stated above, and you " "may publicly display copies." #. type: enumerate msgid "COPYING IN QUANTITY" msgstr "COPYING IN QUANTITY" #. type: enumerate msgid "" "If you publish printed copies (or copies in media that commonly have printed " "covers) of the Document, numbering more than 100, and the Document's license " "notice requires Cover Texts, you must enclose the copies in covers that " "carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the " "front cover, and Back-Cover Texts on the back cover. Both covers must also " "clearly and legibly identify you as the publisher of these copies. The " "front cover must present the full title with all words of the title equally " "prominent and visible. You may add other material on the covers in " "addition. Copying with changes limited to the covers, as long as they " "preserve the title of the Document and satisfy these conditions, can be " "treated as verbatim copying in other respects." msgstr "" "If you publish printed copies (or copies in media that commonly have printed " "covers) of the Document, numbering more than 100, and the Document's license " "notice requires Cover Texts, you must enclose the copies in covers that " "carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the " "front cover, and Back-Cover Texts on the back cover. Both covers must also " "clearly and legibly identify you as the publisher of these copies. The " "front cover must present the full title with all words of the title equally " "prominent and visible. You may add other material on the covers in " "addition. Copying with changes limited to the covers, as long as they " "preserve the title of the Document and satisfy these conditions, can be " "treated as verbatim copying in other respects." #. type: enumerate msgid "" "If the required texts for either cover are too voluminous to fit legibly, " "you should put the first ones listed (as many as fit reasonably) on the " "actual cover, and continue the rest onto adjacent pages." msgstr "" "If the required texts for either cover are too voluminous to fit legibly, " "you should put the first ones listed (as many as fit reasonably) on the " "actual cover, and continue the rest onto adjacent pages." #. type: enumerate msgid "" "If you publish or distribute Opaque copies of the Document numbering more " "than 100, you must either include a machine-readable Transparent copy along " "with each Opaque copy, or state in or with each Opaque copy a computer-" "network location from which the general network-using public has access to " "download using public-standard network protocols a complete Transparent copy " "of the Document, free of added material. If you use the latter option, you " "must take reasonably prudent steps, when you begin distribution of Opaque " "copies in quantity, to ensure that this Transparent copy will remain thus " "accessible at the stated location until at least one year after the last " "time you distribute an Opaque copy (directly or through your agents or " "retailers) of that edition to the public." msgstr "" "If you publish or distribute Opaque copies of the Document numbering more " "than 100, you must either include a machine-readable Transparent copy along " "with each Opaque copy, or state in or with each Opaque copy a computer-" "network location from which the general network-using public has access to " "download using public-standard network protocols a complete Transparent copy " "of the Document, free of added material. If you use the latter option, you " "must take reasonably prudent steps, when you begin distribution of Opaque " "copies in quantity, to ensure that this Transparent copy will remain thus " "accessible at the stated location until at least one year after the last " "time you distribute an Opaque copy (directly or through your agents or " "retailers) of that edition to the public." #. type: enumerate msgid "" "It is requested, but not required, that you contact the authors of the " "Document well before redistributing any large number of copies, to give them " "a chance to provide you with an updated version of the Document." msgstr "" "It is requested, but not required, that you contact the authors of the " "Document well before redistributing any large number of copies, to give them " "a chance to provide you with an updated version of the Document." #. type: enumerate msgid "MODIFICATIONS" msgstr "MODIFICATIONS" #. type: enumerate msgid "" "You may copy and distribute a Modified Version of the Document under the " "conditions of sections 2 and 3 above, provided that you release the Modified " "Version under precisely this License, with the Modified Version filling the " "role of the Document, thus licensing distribution and modification of the " "Modified Version to whoever possesses a copy of it. In addition, you must " "do these things in the Modified Version:" msgstr "" "You may copy and distribute a Modified Version of the Document under the " "conditions of sections 2 and 3 above, provided that you release the Modified " "Version under precisely this License, with the Modified Version filling the " "role of the Document, thus licensing distribution and modification of the " "Modified Version to whoever possesses a copy of it. In addition, you must " "do these things in the Modified Version:" #. type: enumerate msgid "" "Use in the Title Page (and on the covers, if any) a title distinct from that " "of the Document, and from those of previous versions (which should, if there " "were any, be listed in the History section of the Document). You may use " "the same title as a previous version if the original publisher of that " "version gives permission." msgstr "" "Use in the Title Page (and on the covers, if any) a title distinct from that " "of the Document, and from those of previous versions (which should, if there " "were any, be listed in the History section of the Document). You may use " "the same title as a previous version if the original publisher of that " "version gives permission." #. type: enumerate msgid "" "List on the Title Page, as authors, one or more persons or entities " "responsible for authorship of the modifications in the Modified Version, " "together with at least five of the principal authors of the Document (all of " "its principal authors, if it has fewer than five), unless they release you " "from this requirement." msgstr "" "List on the Title Page, as authors, one or more persons or entities " "responsible for authorship of the modifications in the Modified Version, " "together with at least five of the principal authors of the Document (all of " "its principal authors, if it has fewer than five), unless they release you " "from this requirement." #. type: enumerate msgid "" "State on the Title page the name of the publisher of the Modified Version, " "as the publisher." msgstr "" "State on the Title page the name of the publisher of the Modified Version, " "as the publisher." #. type: enumerate msgid "Preserve all the copyright notices of the Document." msgstr "Preserve all the copyright notices of the Document." #. type: enumerate msgid "" "Add an appropriate copyright notice for your modifications adjacent to the " "other copyright notices." msgstr "" "Add an appropriate copyright notice for your modifications adjacent to the " "other copyright notices." #. type: enumerate msgid "" "Include, immediately after the copyright notices, a license notice giving " "the public permission to use the Modified Version under the terms of this " "License, in the form shown in the Addendum below." msgstr "" "Include, immediately after the copyright notices, a license notice giving " "the public permission to use the Modified Version under the terms of this " "License, in the form shown in the Addendum below." #. type: enumerate msgid "" "Preserve in that license notice the full lists of Invariant Sections and " "required Cover Texts given in the Document's license notice." msgstr "" "Preserve in that license notice the full lists of Invariant Sections and " "required Cover Texts given in the Document's license notice." #. type: enumerate msgid "Include an unaltered copy of this License." msgstr "Include an unaltered copy of this License." #. type: enumerate msgid "" "Preserve the section Entitled ``History'', Preserve its Title, and add to it " "an item stating at least the title, year, new authors, and publisher of the " "Modified Version as given on the Title Page. If there is no section " "Entitled ``History'' in the Document, create one stating the title, year, " "authors, and publisher of the Document as given on its Title Page, then add " "an item describing the Modified Version as stated in the previous sentence." msgstr "" "Preserve the section Entitled ``History'', Preserve its Title, and add to it " "an item stating at least the title, year, new authors, and publisher of the " "Modified Version as given on the Title Page. If there is no section " "Entitled ``History'' in the Document, create one stating the title, year, " "authors, and publisher of the Document as given on its Title Page, then add " "an item describing the Modified Version as stated in the previous sentence." #. type: enumerate msgid "" "Preserve the network location, if any, given in the Document for public " "access to a Transparent copy of the Document, and likewise the network " "locations given in the Document for previous versions it was based on. " "These may be placed in the ``History'' section. You may omit a network " "location for a work that was published at least four years before the " "Document itself, or if the original publisher of the version it refers to " "gives permission." msgstr "" "Preserve the network location, if any, given in the Document for public " "access to a Transparent copy of the Document, and likewise the network " "locations given in the Document for previous versions it was based on. " "These may be placed in the ``History'' section. You may omit a network " "location for a work that was published at least four years before the " "Document itself, or if the original publisher of the version it refers to " "gives permission." #. type: enumerate msgid "" "For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve " "the Title of the section, and preserve in the section all the substance and " "tone of each of the contributor acknowledgements and/or dedications given " "therein." msgstr "" "For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve " "the Title of the section, and preserve in the section all the substance and " "tone of each of the contributor acknowledgements and/or dedications given " "therein." #. type: enumerate msgid "" "Preserve all the Invariant Sections of the Document, unaltered in their text " "and in their titles. Section numbers or the equivalent are not considered " "part of the section titles." msgstr "" "Preserve all the Invariant Sections of the Document, unaltered in their text " "and in their titles. Section numbers or the equivalent are not considered " "part of the section titles." #. type: enumerate msgid "" "Delete any section Entitled ``Endorsements''. Such a section may not be " "included in the Modified Version." msgstr "" "Delete any section Entitled ``Endorsements''. Such a section may not be " "included in the Modified Version." #. type: enumerate msgid "" "Do not retitle any existing section to be Entitled ``Endorsements'' or to " "conflict in title with any Invariant Section." msgstr "" "Do not retitle any existing section to be Entitled ``Endorsements'' or to " "conflict in title with any Invariant Section." #. type: enumerate msgid "Preserve any Warranty Disclaimers." msgstr "Preserve any Warranty Disclaimers." #. type: enumerate msgid "" "If the Modified Version includes new front-matter sections or appendices " "that qualify as Secondary Sections and contain no material copied from the " "Document, you may at your option designate some or all of these sections as " "invariant. To do this, add their titles to the list of Invariant Sections " "in the Modified Version's license notice. These titles must be distinct " "from any other section titles." msgstr "" "If the Modified Version includes new front-matter sections or appendices " "that qualify as Secondary Sections and contain no material copied from the " "Document, you may at your option designate some or all of these sections as " "invariant. To do this, add their titles to the list of Invariant Sections " "in the Modified Version's license notice. These titles must be distinct " "from any other section titles." #. type: enumerate msgid "" "You may add a section Entitled ``Endorsements'', provided it contains " "nothing but endorsements of your Modified Version by various parties---for " "example, statements of peer review or that the text has been approved by an " "organization as the authoritative definition of a standard." msgstr "" "You may add a section Entitled ``Endorsements'', provided it contains " "nothing but endorsements of your Modified Version by various parties---for " "example, statements of peer review or that the text has been approved by an " "organization as the authoritative definition of a standard." #. type: enumerate msgid "" "You may add a passage of up to five words as a Front-Cover Text, and a " "passage of up to 25 words as a Back-Cover Text, to the end of the list of " "Cover Texts in the Modified Version. Only one passage of Front-Cover Text " "and one of Back-Cover Text may be added by (or through arrangements made by) " "any one entity. If the Document already includes a cover text for the same " "cover, previously added by you or by arrangement made by the same entity you " "are acting on behalf of, you may not add another; but you may replace the " "old one, on explicit permission from the previous publisher that added the " "old one." msgstr "" "You may add a passage of up to five words as a Front-Cover Text, and a " "passage of up to 25 words as a Back-Cover Text, to the end of the list of " "Cover Texts in the Modified Version. Only one passage of Front-Cover Text " "and one of Back-Cover Text may be added by (or through arrangements made by) " "any one entity. If the Document already includes a cover text for the same " "cover, previously added by you or by arrangement made by the same entity you " "are acting on behalf of, you may not add another; but you may replace the " "old one, on explicit permission from the previous publisher that added the " "old one." #. type: enumerate msgid "" "The author(s) and publisher(s) of the Document do not by this License give " "permission to use their names for publicity for or to assert or imply " "endorsement of any Modified Version." msgstr "" "The author(s) and publisher(s) of the Document do not by this License give " "permission to use their names for publicity for or to assert or imply " "endorsement of any Modified Version." #. type: enumerate msgid "COMBINING DOCUMENTS" msgstr "COMBINING DOCUMENTS" #. type: enumerate msgid "" "You may combine the Document with other documents released under this " "License, under the terms defined in section 4 above for modified versions, " "provided that you include in the combination all of the Invariant Sections " "of all of the original documents, unmodified, and list them all as Invariant " "Sections of your combined work in its license notice, and that you preserve " "all their Warranty Disclaimers." msgstr "" "You may combine the Document with other documents released under this " "License, under the terms defined in section 4 above for modified versions, " "provided that you include in the combination all of the Invariant Sections " "of all of the original documents, unmodified, and list them all as Invariant " "Sections of your combined work in its license notice, and that you preserve " "all their Warranty Disclaimers." #. type: enumerate msgid "" "The combined work need only contain one copy of this License, and multiple " "identical Invariant Sections may be replaced with a single copy. If there " "are multiple Invariant Sections with the same name but different contents, " "make the title of each such section unique by adding at the end of it, in " "parentheses, the name of the original author or publisher of that section if " "known, or else a unique number. Make the same adjustment to the section " "titles in the list of Invariant Sections in the license notice of the " "combined work." msgstr "" "The combined work need only contain one copy of this License, and multiple " "identical Invariant Sections may be replaced with a single copy. If there " "are multiple Invariant Sections with the same name but different contents, " "make the title of each such section unique by adding at the end of it, in " "parentheses, the name of the original author or publisher of that section if " "known, or else a unique number. Make the same adjustment to the section " "titles in the list of Invariant Sections in the license notice of the " "combined work." #. type: enumerate msgid "" "In the combination, you must combine any sections Entitled ``History'' in " "the various original documents, forming one section Entitled ``History''; " "likewise combine any sections Entitled ``Acknowledgements'', and any " "sections Entitled ``Dedications''. You must delete all sections Entitled " "``Endorsements.''" msgstr "" "In the combination, you must combine any sections Entitled ``History'' in " "the various original documents, forming one section Entitled ``History''; " "likewise combine any sections Entitled ``Acknowledgements'', and any " "sections Entitled ``Dedications''. You must delete all sections Entitled " "``Endorsements.''" #. type: enumerate msgid "COLLECTIONS OF DOCUMENTS" msgstr "COLLECTIONS OF DOCUMENTS" #. type: enumerate msgid "" "You may make a collection consisting of the Document and other documents " "released under this License, and replace the individual copies of this " "License in the various documents with a single copy that is included in the " "collection, provided that you follow the rules of this License for verbatim " "copying of each of the documents in all other respects." msgstr "" "You may make a collection consisting of the Document and other documents " "released under this License, and replace the individual copies of this " "License in the various documents with a single copy that is included in the " "collection, provided that you follow the rules of this License for verbatim " "copying of each of the documents in all other respects." #. type: enumerate msgid "" "You may extract a single document from such a collection, and distribute it " "individually under this License, provided you insert a copy of this License " "into the extracted document, and follow this License in all other respects " "regarding verbatim copying of that document." msgstr "" "You may extract a single document from such a collection, and distribute it " "individually under this License, provided you insert a copy of this License " "into the extracted document, and follow this License in all other respects " "regarding verbatim copying of that document." #. type: enumerate msgid "AGGREGATION WITH INDEPENDENT WORKS" msgstr "AGGREGATION WITH INDEPENDENT WORKS" #. type: enumerate msgid "" "A compilation of the Document or its derivatives with other separate and " "independent documents or works, in or on a volume of a storage or " "distribution medium, is called an ``aggregate'' if the copyright resulting " "from the compilation is not used to limit the legal rights of the " "compilation's users beyond what the individual works permit. When the " "Document is included in an aggregate, this License does not apply to the " "other works in the aggregate which are not themselves derivative works of " "the Document." msgstr "" "A compilation of the Document or its derivatives with other separate and " "independent documents or works, in or on a volume of a storage or " "distribution medium, is called an ``aggregate'' if the copyright resulting " "from the compilation is not used to limit the legal rights of the " "compilation's users beyond what the individual works permit. When the " "Document is included in an aggregate, this License does not apply to the " "other works in the aggregate which are not themselves derivative works of " "the Document." #. type: enumerate msgid "" "If the Cover Text requirement of section 3 is applicable to these copies of " "the Document, then if the Document is less than one half of the entire " "aggregate, the Document's Cover Texts may be placed on covers that bracket " "the Document within the aggregate, or the electronic equivalent of covers if " "the Document is in electronic form. Otherwise they must appear on printed " "covers that bracket the whole aggregate." msgstr "" "If the Cover Text requirement of section 3 is applicable to these copies of " "the Document, then if the Document is less than one half of the entire " "aggregate, the Document's Cover Texts may be placed on covers that bracket " "the Document within the aggregate, or the electronic equivalent of covers if " "the Document is in electronic form. Otherwise they must appear on printed " "covers that bracket the whole aggregate." #. type: enumerate msgid "TRANSLATION" msgstr "TRANSLATION" #. type: enumerate msgid "" "Translation is considered a kind of modification, so you may distribute " "translations of the Document under the terms of section 4. Replacing " "Invariant Sections with translations requires special permission from their " "copyright holders, but you may include translations of some or all Invariant " "Sections in addition to the original versions of these Invariant Sections. " "You may include a translation of this License, and all the license notices " "in the Document, and any Warranty Disclaimers, provided that you also " "include the original English version of this License and the original " "versions of those notices and disclaimers. In case of a disagreement " "between the translation and the original version of this License or a notice " "or disclaimer, the original version will prevail." msgstr "" "Translation is considered a kind of modification, so you may distribute " "translations of the Document under the terms of section 4. Replacing " "Invariant Sections with translations requires special permission from their " "copyright holders, but you may include translations of some or all Invariant " "Sections in addition to the original versions of these Invariant Sections. " "You may include a translation of this License, and all the license notices " "in the Document, and any Warranty Disclaimers, provided that you also " "include the original English version of this License and the original " "versions of those notices and disclaimers. In case of a disagreement " "between the translation and the original version of this License or a notice " "or disclaimer, the original version will prevail." #. type: enumerate msgid "" "If a section in the Document is Entitled ``Acknowledgements'', " "``Dedications'', or ``History'', the requirement (section 4) to Preserve its " "Title (section 1) will typically require changing the actual title." msgstr "" "If a section in the Document is Entitled ``Acknowledgements'', " "``Dedications'', or ``History'', the requirement (section 4) to Preserve its " "Title (section 1) will typically require changing the actual title." #. type: enumerate msgid "TERMINATION" msgstr "TERMINATION" #. type: enumerate msgid "" "You may not copy, modify, sublicense, or distribute the Document except as " "expressly provided for under this License. Any other attempt to copy, " "modify, sublicense or distribute the Document is void, and will " "automatically terminate your rights under this License. However, parties " "who have received copies, or rights, from you under this License will not " "have their licenses terminated so long as such parties remain in full " "compliance." msgstr "" "You may not copy, modify, sublicense, or distribute the Document except as " "expressly provided for under this License. Any other attempt to copy, " "modify, sublicense or distribute the Document is void, and will " "automatically terminate your rights under this License. However, parties " "who have received copies, or rights, from you under this License will not " "have their licenses terminated so long as such parties remain in full " "compliance." #. type: enumerate msgid "FUTURE REVISIONS OF THIS LICENSE" msgstr "FUTURE REVISIONS OF THIS LICENSE" #. type: enumerate msgid "" "The Free Software Foundation may publish new, revised versions of the GNU " "Free Documentation License from time to time. Such new versions will be " "similar in spirit to the present version, but may differ in detail to " "address new problems or concerns. See @uref{http://www.gnu.org/copyleft/}." msgstr "" "The Free Software Foundation may publish new, revised versions of the GNU " "Free Documentation License from time to time. Such new versions will be " "similar in spirit to the present version, but may differ in detail to " "address new problems or concerns. See @uref{http://www.gnu.org/copyleft/}." #. type: enumerate msgid "" "Each version of the License is given a distinguishing version number. If " "the Document specifies that a particular numbered version of this License " "``or any later version'' applies to it, you have the option of following the " "terms and conditions either of that specified version or of any later " "version that has been published (not as a draft) by the Free Software " "Foundation. If the Document does not specify a version number of this " "License, you may choose any version ever published (not as a draft) by the " "Free Software Foundation." msgstr "" "Each version of the License is given a distinguishing version number. If " "the Document specifies that a particular numbered version of this License " "``or any later version'' applies to it, you have the option of following the " "terms and conditions either of that specified version or of any later " "version that has been published (not as a draft) by the Free Software " "Foundation. If the Document does not specify a version number of this " "License, you may choose any version ever published (not as a draft) by the " "Free Software Foundation." #. type: unnumberedsec #, no-wrap msgid "ADDENDUM: How to use this License for your documents" msgstr "ADDENDUM: How to use this License for your documents" #. type: ifnotinfo msgid "" "To use this License in a document you have written, include a copy of the " "License in the document and put the following copyright and license notices " "just after the title page:" msgstr "" "To use this License in a document you have written, include a copy of the " "License in the document and put the following copyright and license notices " "just after the title page:" #. type: group #, fuzzy, no-wrap #| msgid "Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being ``A Network Theory Manual'', and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License''." msgid "" " Copyright (C) @var{year} @var{your name}. \n" " Permission is granted to copy, distribute and/or modify\n" " this document under the terms of the GNU Free\n" " Documentation License, Version 1.2 or any later version\n" " published by the Free Software Foundation; with no\n" " Invariant Sections, no Front-Cover Texts, and no\n" " Back-Cover Texts. A copy of the license is included in\n" " the section entitled ``GNU Free Documentation License''.\n" msgstr "" "Se permite la copia, distribuci@'on y/o modificaci@'on de este\n" "documento bajo los t@'erminos de la Licencia de Documentaci@'on Libre\n" "de GNU, Versi@'on 1.2 o cualquier versi@'on posterior publicada por\n" "la Free Software Foundation; sin Secciones Invariantes, con el Texto\n" "de Portada diciendo ``Un Manual de Network Theory'', y con el Texto de\n" "Contraportada como en (a). Una copia de la licencia est@'a incluida\n" "en la secci@'on titulada ``GNU Free Documentation License''." #. type: ifnotinfo msgid "" "If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, " "replace the ``with...Texts.'' line with this:" msgstr "" "If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, " "replace the ``with...Texts.'' line with this:" #. type: group #, no-wrap msgid "" " with the Invariant Sections being @var{list their\n" " titles}, with the Front-Cover Texts being @var{list}, and\n" " with the Back-Cover Texts being @var{list}.\n" msgstr "" " with the Invariant Sections being @var{list their\n" " titles}, with the Front-Cover Texts being @var{list}, and\n" " with the Back-Cover Texts being @var{list}.\n" #. type: ifnotinfo msgid "" "If you have Invariant Sections without Cover Texts, or some other " "combination of the three, merge those two alternatives to suit the situation." msgstr "" "If you have Invariant Sections without Cover Texts, or some other " "combination of the three, merge those two alternatives to suit the situation." #. type: ifnotinfo msgid "" "If your document contains nontrivial examples of program code, we recommend " "releasing these examples in parallel under your choice of free software " "license, such as the GNU General Public License, to permit their use in free " "software." msgstr "" "If your document contains nontrivial examples of program code, we recommend " "releasing these examples in parallel under your choice of free software " "license, such as the GNU General Public License, to permit their use in free " "software." #. type: ifset msgid "@*" msgstr "@*" #, fuzzy #~| msgid "An Introduction to GCC" #~ msgid "" #~ "[[!meta title=\"An Introduction to GCC\"]] [[!meta permalink=\"/" #~ "an_introduction_to_gcc\"]]" #~ msgstr "Una Introducci@'on a GCC" #~ msgid "Other books from the publisher" #~ msgstr "Otros libros del editor" #~ msgid "rms.texi" #~ msgstr "rms.texi" #~ msgid "books.texi" #~ msgstr "books.es.texi" #~ msgid "associations.texi" #~ msgstr "associations.es.texi" #~ msgid "fdl.texi" #~ msgstr "fdl.texi" #~ msgid "" #~ "$ gcc -Wall bad.c -o bad\n" #~ "bad.c: In function `main':\n" #~ "bad.c:6: warning: double format, different \n" #~ " type arg (arg 2)\n" #~ msgstr "" #~ "$ gcc -Wall mal.es.c -o mal\n" #~ "mal.es.c: In function `main':\n" #~ "mal.es.c:6: warning: double format, differen\n" #~ " type arg (arg 2)" #~ msgid "@verbatiminclude badpow.c\n" #~ msgstr "@verbatiminclude malpow.es.c\n" #~ msgid "linkr error, cannot find library" #~ msgstr "error de enlace, no puedo encontrar librer@'{@dotless{i}}a" #~ msgid "" #~ "$ cpp -dM /dev/null\n" #~ "#define __i386__ 1 \n" #~ "#define __i386 1 \n" #~ "#define i386 1 \n" #~ "#define __unix 1 \n" #~ "#define __unix__ 1 \n" #~ "#define __ELF__ 1 \n" #~ "#define unix 1 \n" #~ ".......\n" #~ msgstr "" #~ "$ cpp -dM /dev/null\n" #~ "#define __i386__ 1 \n" #~ "#define __i386 1 \n" #~ "#define i386 1 \n" #~ "#define __unix 1 \n" #~ "#define __unix__ 1 \n" #~ "#define __ELF__ 1 \n" #~ "#define unix 1 \n" #~ ".......\n" #~ msgid "" #~ "$ gcc -E test.c\n" #~ "# 1 \"test.c\"\n" #~ "\n" #~ msgstr "" #~ "$ gcc -E test.es.c\n" #~ "# 1 \"test.es.c\"\n" #~ "\n" #~ msgid "" #~ "$ gcc -v\n" #~ "Reading specs from /usr/lib/gcc-lib/i686/3.3.1/specs\n" #~ "Configured with: ../configure --prefix=/usr\n" #~ "Thread model: posix\n" #~ "gcc version 3.3.1\n" #~ msgstr "" #~ "$ gcc -v\n" #~ "Reading specs from /usr/lib/gcc-lib/i686/3.3.1/specs\n" #~ "Configured with: ../configure --prefix=/usr\n" #~ "Thread model: posix\n" #~ "gcc version 3.3.1\n" #~ msgid "" #~ "$ gcc -v -Wall hello.c\n" #~ "Reading specs from /usr/lib/gcc-lib/i686/3.3.1/specs\n" #~ "Configured with: ../configure --prefix=/usr\n" #~ "Thread model: posix\n" #~ "gcc version 3.3.1\n" #~ " /usr/lib/gcc-lib/i686/3.3.1/cc1 -quiet -v -D__GNUC__=3 \n" #~ " -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 \n" #~ " hello.c -quiet -dumpbase hello.c -auxbase hello -Wall\n" #~ " -version -o /tmp/cceCee26.s\n" #~ "GNU C version 3.3.1 (i686-pc-linux-gnu)\n" #~ " compiled by GNU C version 3.3.1 (i686-pc-linux-gnu)\n" #~ "GGC heuristics: --param ggc-min-expand=51 \n" #~ " --param ggc-min-heapsize=40036\n" #~ "ignoring nonexistent directory \"/usr/i686/include\"\n" #~ "#include \"...\" search starts here:\n" #~ "#include <...> search starts here:\n" #~ " /usr/local/include\n" #~ " /usr/include\n" #~ " /usr/lib/gcc-lib/i686/3.3.1/include\n" #~ " /usr/include\n" #~ "End of search list.\n" #~ " as -V -Qy -o /tmp/ccQynbTm.o /tmp/cceCee26.s\n" #~ "GNU assembler version 2.12.90.0.1 (i386-linux)\n" #~ "using BFD version 2.12.90.0.1 20020307 Debian/GNU\n" #~ "Linux\n" #~ "/usr/lib/gcc-lib/i686/3.3.1/collect2\n" #~ " --eh-frame-hdr -m elf_i386 -dynamic-linker\n" #~ " /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o\n" #~ " /usr/lib/gcc-lib/i686/3.3.1/crtbegin.o\n" #~ " -L/usr/lib/gcc-lib/i686/3.3.1\n" #~ " -L/usr/lib/gcc-lib/i686/3.3.1/../../.. /tmp/ccQynbTm.o\n" #~ " -lgcc -lgcc_eh -lc -lgcc -lgcc_eh\n" #~ " /usr/lib/gcc-lib/i686/3.3.1/crtend.o\n" #~ " /usr/lib/crtn.o\n" #~ msgstr "" #~ "$ gcc -v -Wall hola.es.c\n" #~ "Reading specs from /usr/lib/gcc-lib/i686/3.3.1/specs\n" #~ "Configured with: ../configure --prefix=/usr\n" #~ "Thread model: posix\n" #~ "gcc version 3.3.1\n" #~ "/usr/lib/gcc-lib/i686/3.3.1/cc1 -quiet -v -D__GNUC__=3\n" #~ " -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 \n" #~ "hola.es.c -quiet -dumpbase hola.es.c -auxbase hola -Wall\n" #~ " -version -o /tmp/cceCee26.s\n" #~ "GNU C version 3.3.1 (i686-pc-linux-gnu)\n" #~ " compiled by GNU C version 3.3.1 (i686-pc-linux-gnu)\n" #~ "GGC heuristics: --param ggc-min-expand=51 \n" #~ " --param ggc-min-heapsize=40036\n" #~ "ignoring nonexistent directory \"/usr/i686/include\"\n" #~ "#include \"...\" search starts here:\n" #~ "#include <...> search starts here:\n" #~ " /usr/local/include\n" #~ " /usr/include\n" #~ " /usr/lib/gcc-lib/i686/3.3.1/include\n" #~ " /usr/include\n" #~ "End of search list.\n" #~ " as -V -Qy -o /tmp/ccQynbTm.o /tmp/cceCee26.s\n" #~ "GNU assembler version 2.12.90.0.1 (i386-linux)\n" #~ "using BFD version 2.12.90.0.1 20020307 Debian/GNU\n" #~ "Linux\n" #~ "/usr/lib/gcc-lib/i686/3.3.1/collect2\n" #~ " --eh-frame-hdr -m elf_i386 -dynamic-linker\n" #~ " /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o\n" #~ " /usr/lib/gcc-lib/i686/3.3.1/crtbegin.o\n" #~ " -L/usr/lib/gcc-lib/i686/3.3.1\n" #~ " -L/usr/lib/gcc-lib/i686/3.3.1/../.. /tmp/ccQynbTm.o\n" #~ " -lgcc -lgcc_eh -lc -lgcc -lgcc_eh\n" #~ " /usr/lib/gcc-lib/i686/3.3.1/crtend.o\n" #~ " /usr/lib/crtn.o" #~ msgid "" #~ "warning: This file includes at least one deprecated or antiquated header." #~ msgstr "" #~ "warning: This file includes at least one deprecated or antiquated header." #~ msgid "file includes at least one deprecated or antiquated header" #~ msgstr "fichero que incluye al menos una cabecera obsoleta o anticuada" #~ msgid "deprecated header in C++" #~ msgstr "cabecera en C++ obsoleta" #~ msgid "antiquated header in C++" #~ msgstr "anticuada cabecera en C++" #~ msgid "old-style C++ header files" #~ msgstr "ficheros de cabecera de C++ al viejo estilo" #~ msgid "" #~ "This warning is generated for C++ programs which include old-style " #~ "library header files, such as @file{iostream.h}, instead of the modern C+" #~ "+ library headers without the @file{.h} extension. The old headers " #~ "import their functions into the top-level global namespace, instead of " #~ "using the @code{std::} namespace. Note that old-style header files are " #~ "still supported, so this message is only a warning and existing programs " #~ "will continue to compile. The message is actually generated by a @code" #~ "{#warning} directive in the old header files, and not by the preprocessor " #~ "itself." #~ msgstr "" #~ "Este aviso es generado por programas C++ que incluyen ficheros de " #~ "cabecera de\n" #~ "librer@'{@dotless{i}}as al viejo estilo, tal como @file{iostream.h}, en " #~ "vez de cabeceras de \n" #~ "librer@'{@dotless{i}}as de C++ modernas sin la extensi@'on @file{.h}. Las " #~ "viejas cabeceras \n" #~ "importan sus funciones en el espacio global de nombres, en vez de usar " #~ "el \n" #~ "espacio de nombres @code{std::}. N@'otese que los ficheros de cabecera al " #~ "viejo \n" #~ "estilo est@'an todav@'{@dotless{i}}a soportado, as@'{@dotless{i}} este " #~ "mensaje es s@'olo un aviso y los \n" #~ "programas existentes podr@'an compilarse. El mensaje est@'a actualmente " #~ "generado \n" #~ "por una directiva @code{#warning} en los viejos ficheros de cabecera, y " #~ "no por\n" #~ "el preprocesador en s@'{@dotless{i}}." #~ msgid "@code{#warning}, preprocessor directive" #~ msgstr "@code{#warning}, directiva del preprocesador" #~ msgid "@verbatiminclude msg-cppheader.c\n" #~ msgstr "@verbatiminclude msg-cppheader.es.c\n" #~ msgid "" #~ "This program uses an old-style header file @file{iostream.h}. It could " #~ "be updated to use @code{#include } and @code{std::cout} instead." #~ msgstr "" #~ "Este programa usa un fichero de cabecera al viejo estilo\n" #~ "@file{iostream.h}. Podr@'{@dotless{i}}a ser actualizado para usar\n" #~ "@code{#include } y @code{std::cout}. "