]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
[Patch ifcvt] Teach RTL ifcvt to handle multiple simple set instructions
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
e01d41e5
JJ
12015-11-05 Jakub Jelinek <jakub@redhat.com>
2 Ilya Verbin <ilya.verbin@intel.com>
3
4 * c-parser.c: Include context.h and gimple-expr.h.
5 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6 monotonic together with nonmonotonic.
7 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
8 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
9 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
10 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
11 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
12 expressions on combined target teams before the target.
13 (c_parser_omp_declare_target): If decl has "omp declare target" or
14 "omp declare target link" attribute, and cgraph or varpool node already
15 exists, then set corresponding flags. Call c_finish_omp_clauses
16 in the parenthesized extended-list syntax case.
17 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
18 declare target.
19 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
20 on OMP_CLAUSE_REDUCTION array sections.
21 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
22 into the constant offset, or for variable low-bound using
23 POINTER_PLUS_EXPR. For structure element based array sections use
24 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
25 (c_finish_omp_clauses): Drop generic_field_head, structure
26 elements are now always mapped even as array section bases,
27 diagnose same var in data sharing and mapping clauses. Diagnose if
28 linear step on declare simd is neither a constant nor a uniform
29 parameter. Look through POINTER_PLUS_EXPR for array section
30 reductions. Diagnose the same var or function appearing multiple
31 times on the same directive. Fix up wording for the to clause if t
32 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
33 modifier on kinds other than dynamic or guided or nonmonotonic
34 modifier together with ordered clause.
35
4bf9e5a8
TS
362015-11-03 Thomas Schwinge <thomas@codesourcery.com>
37 Chung-Lin Tang <cltang@codesourcery.com>
38
39 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
40
2adfab87
AM
412015-10-29 Andrew MacLeod <amacleod@redhat.com>
42
43 * c-array-notation.c: Reorder #include's and remove duplicates.
44 * c-aux-info.c: Likewise.
45 * c-convert.c: Likewise.
46 * c-decl.c: Likewise.
47 * c-errors.c: Likewise.
48 * c-lang.c: Likewise.
49 * c-objc-common.c: Likewise.
50 * c-parser.c: Likewise.
51 * c-typeck.c: Likewise.
52
e922069e
JW
532015-10-26 Jim Wilson <jim.wilson@linaro.org>
54
55 PR debug/66068
56 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
57 after calling build_qualified_type.
58
765dd391
CP
592015-10-27 Cesar Philippidis <cesar@codesourcery.com>
60 Thomas Schwinge <thomas@codesourcery.com>
61 James Norris <jnorris@codesourcery.com>
62 Joseph Myers <joseph@codesourcery.com>
63 Julian Brown <julian@codesourcery.com>
64 Bernd Schmidt <bschmidt@redhat.com>
65
66 * c-parser.c (c_parser_oacc_shape_clause): New.
67 (c_parser_oacc_simple_clause): New.
68 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
69 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
70
88bae6f4
TS
712015-10-27 Thomas Schwinge <thomas@codesourcery.com>
72 James Norris <jnorris@codesourcery.com>
73 Cesar Philippidis <cesar@codesourcery.com>
74
75 PR c/64765
76 PR c/64880
77 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
78 parameters, and handle these. Adjust all users.
79 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
80 into...
81 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
82 all users.
83 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
84 declare functions.
85 (c_finish_omp_construct): Declare function.
86 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
87 Merge functions into...
88 (c_finish_omp_construct): ... this new function.
89
a8fc2579
RB
902015-10-22 Richard Biener <rguenther@suse.de>
91
92 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
93 before folding a MINUS_EXPR.
94
e9122ef6
MP
952015-10-21 Marek Polacek <polacek@redhat.com>
96
97 PR c/68024
98 * c-decl.c (start_function): Warn about vararg functions without
99 a prototype.
100
9f47c7e5
IE
1012015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
102
103 * c-typeck.c (build_conditional_expr): Use boolean vector
104 type for vector comparison.
105 (build_vec_cmp): New.
106 (build_binary_op): Use build_vec_cmp for comparison.
107
fa60eeb9
MP
1082015-10-20 Marek Polacek <polacek@redhat.com>
109
110 * c-parser.c (is_cilkplus_vector_p): Don't define here.
111
2c7020eb
MP
1122015-10-20 Marek Polacek <polacek@redhat.com>
113
114 PR c/67964
115 * c-parser.c (c_parser_attributes): Break out of the loop if the
116 token after an attribute isn't a comma.
117
d9a6bd32
JJ
1182015-10-13 Jakub Jelinek <jakub@redhat.com>
119 Aldy Hernandez <aldyh@redhat.com>
120
121 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
122 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
123 (c_parser_omp_variable_list): Handle structure elements for
124 map, to and from clauses. Handle array sections in reduction
125 clause. Formatting fixes.
126 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
127 if clause modifiers.
128 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
129 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
130 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
131 c_parser_omp_clause_is_device_ptr): New functions.
132 (c_parser_omp_clause_ordered): Parse optional parameter.
133 (c_parser_omp_clause_reduction): Handle array reductions.
134 (c_parser_omp_clause_schedule): Parse optional simd modifier.
135 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
136 functions.
137 (c_parser_omp_clause_linear): Parse linear clause modifiers.
138 (c_parser_omp_clause_depend_sink): New function.
139 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
140 (c_parser_omp_clause_map): Parse release/delete map kinds and
141 optional always modifier.
142 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
143 and c_finish_omp_clauses callers.
144 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
145 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
146 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
147 (OMP_CRITICAL_CLAUSE_MASK): Define.
148 (c_parser_omp_critical): Parse critical clauses.
149 (c_parser_omp_for_loop): Handle doacross loops, adjust
150 c_finish_omp_for and c_finish_omp_clauses callers.
151 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
152 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
153 (OMP_FOR_CLAUSE_MASK): Add linear clause.
154 (c_parser_omp_for): Disallow ordered clause when combined with
155 distribute. Disallow linear clause when combined with distribute
156 and not combined with simd.
157 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
158 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
159 parse clauses and if depend clause is found, don't parse a body.
160 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
161 Allow target parallel without for after it.
162 (OMP_TASK_CLAUSE_MASK): Add priority clause.
163 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
164 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
165 invalid kinds.
166 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
167 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
168 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
169 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
170 functions.
171 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
172 defaultmap and is_device_ptr clauses.
173 (c_parser_omp_target): Parse target parallel and target simd. Set
174 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
175 and target exit data. Diagnose invalid map kinds.
176 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
177 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
178 construct.
179 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
180 &omp_priv.
181 (OMP_TASKLOOP_CLAUSE_MASK): Define.
182 (c_parser_omp_taskloop): New function.
183 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
184 handle PRAGMA_OMP_TASKLOOP.
185 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
186 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
187 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
188 Add IS_OMP argument, handle structure element bases, diagnose
189 bitfields, pass IS_OMP recursively, diagnose known zero length
190 array sections in depend clauses, handle array sections in reduction
191 clause, diagnose negative length even for pointers.
192 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
193 types, pass IS_OMP down to handle_omp_array_sections_1, handle
194 array sections in reduction clause, set
195 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
196 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
197 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
198 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
199
21ba0cea
MP
2002015-10-06 Marek Polacek <polacek@redhat.com>
201
202 * c-parser.c (c_parser_statement_after_labels): Use
203 protected_set_expr_location.
204 (c_parser_omp_clause_num_gangs): Likewise.
205 (c_parser_omp_clause_num_threads): Likewise.
206 (c_parser_omp_clause_num_workers): Likewise.
207 (c_parser_omp_clause_vector_length): Likewise.
208 (c_parser_omp_clause_num_teams): Likewise.
209 (c_parser_omp_clause_thread_limit): Likewise.
210 * c-typeck.c (build_c_cast): Likewise.
211 (c_cast_expr): Likewise.
212
624d31fe
RS
2132015-10-05 Richard Sandiford <richard.sandiford@arm.com>
214
215 * c-typeck.c (c_tree_equal): Use real_equal instead of
216 REAL_VALUES_EQUAL.
217
b8fd7909
JM
2182015-10-04 Jason Merrill <jason@redhat.com>
219
220 * c-parser.c (c_lex_one_token): Handle @synchronized.
221 * c-decl.c (match_builtin_function_types): A declaration of a built-in
222 can change whether the function is transaction_safe.
223
1c7485af
MP
2242015-10-02 Marek Polacek <polacek@redhat.com>
225
226 PR c/67730
227 * c-typeck.c (convert_for_assignment): Use the expansion point
228 location throughout.
229
3e3b8d63
MP
2302015-10-02 Marek Polacek <polacek@redhat.com>
231
232 PR c/64249
233 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
234 and pass it down to c_parser_if_statement.
235 (c_parser_else_body): Add CHAIN parameter and pass it down to
236 c_parser_statement_after_labels.
237 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
238 duplicated if-else-if conditions.
239
aabef2de
MP
2402015-10-01 Marek Polacek <polacek@redhat.com>
241
242 * c-typeck.c (convert_for_assignment): Improve commentary.
243
de8ddd5f
MP
2442015-09-30 Marek Polacek <polacek@redhat.com>
245
246 PR c/67730
247 * c-typeck.c (c_finish_return): Use the expansion point location for
248 certain "return with value" warnings.
249
c4914de6
MLI
2502015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
251
252 * c-parser.c (pragma_lex): Add loc argument.
253
0e36f5c7
MP
2542015-09-15 Marek Polacek <polacek@redhat.com>
255
256 PR c/67580
257 * c-decl.c (tag_exists_p): New function.
258 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
259 struct/union/enum keywords are missing.
260 * c-tree.h (tag_exists_p): Declare.
261
2f3bb934
MP
2622015-09-15 Marek Polacek <polacek@redhat.com>
263
264 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
265 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
266 Return NULL_TREE instead of 0.
267 (lookup_name): Return NULL_TREE instead of 0.
268 (lookup_name_in_scope): Likewise.
269 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
270 (parser_xref_tag): Use false instead of 0.
271 (start_struct): Use true instead of 1.
272 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
273
aa256c4a
MP
2742015-09-14 Marek Polacek <polacek@redhat.com>
275
276 * c-typeck.c (set_nonincremental_init_from_string): Use
277 HOST_WIDE_INT_M1U when shifting a negative value.
278
dbb68221
MW
2792015-09-09 Mark Wielaard <mjw@redhat.com>
280
281 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
282 parm against NULL.
283
a8a098ac
JJ
2842015-09-10 Jakub Jelinek <jakub@redhat.com>
285
286 PR c/67502
287 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
288 into OMP_FOR_PRE_BODY rather than before the loop.
289
f4b189d5
JJ
2902015-09-09 Jakub Jelinek <jakub@redhat.com>
291
0bb99c11
JJ
292 PR c/67501
293 * c-parser.c (c_parser_oacc_all_clauses,
294 c_parser_omp_all_clauses): Remove invalid clause from
295 list of clauses even if parser->error is set.
296
fce5e5e3
JJ
297 PR c/67500
298 * c-parser.c (c_parser_omp_clause_aligned,
299 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
300 test for errors.
301 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
302 error_mark_node.
303
f4b189d5
JJ
304 PR c/67495
305 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
306 instead of c_parser_unary_expression. If the result is !lvalue_p,
307 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
308
b2aaf235
MP
3092015-09-04 Marek Polacek <polacek@redhat.com>
310
311 PR sanitizer/67279
312 * c-typeck.c (build_binary_op): Don't instrument static initializers.
313
1807ffc1
MS
3142015-09-03 Martin Sebor <msebor@redhat.com>
315
316 PR c/66516
8b652e65
JJ
317 * c-typeck.c (convert_arguments, parser_build_unary_op,
318 build_conditional_expr, c_cast_expr, convert_for_assignment,
319 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
320 reject_gcc_builtin.
321 (c_decl_implicit): Define.
322
d04ff417
MP
3232015-09-02 Marek Polacek <polacek@redhat.com>
324
325 PR c/67432
326 * c-parser.c (c_parser_enum_specifier): Give a better error for
327 an empty enum.
328
a79683d5
TS
3292015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
330
331 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
332
191a6b94
MP
3332015-08-12 Marek Polacek <polacek@redhat.com>
334
335 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
336 LOC to it.
337
420a9d9b
MP
3382015-08-03 Marek Polacek <polacek@redhat.com>
339
340 PR c/67088
341 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
342 Use it.
343 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
344
992118a1
PP
3452015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
346
347 * c-parser.c (c_parser_if_body): Take token_indent_info
348 argument. Call warn_for_misleading_indentation even when the
349 body is a semicolon. Extract token_indent_infos corresponding
350 to the guard, body and next tokens. Adjust call to
351 warn_for_misleading_indentation accordingly.
352 (c_parser_else_body): Likewise.
353 (c_parser_if_statement): Likewise.
354 (c_parser_while_statement): Likewise.
355 (c_parser_for_statement): Likewise.
356
46308474
LFSM
3572015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
358 Manuel López-Ibáñez <manu@gcc.gnu.org>
359
360 * c-decl.c (get_parm_info): Remove static var. Update warning
361 message.
362
05b28fd6
MP
3632015-07-27 Marek Polacek <polacek@redhat.com>
364
365 PR c++/66555
366 PR c/54979
367 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
368
451b5e48
MP
3692015-07-20 Marek Polacek <polacek@redhat.com>
370
371 PR c++/55095
372 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
373 (build_binary_op): Warn about left shift overflows.
374
1916bcb5
AM
3752015-07-09 Andrew MacLeod <amacleod@redhat.com>
376
377 * c-array-notation.c: Adjust includes for flags.h changes.
378 * c-objc-common.c: Likewise.
379
c7131fb2
AM
3802015-07-07 Andrew MacLeod <amacleod@redhat.com>
381
382 * c-array-notation.c: Adjust includes.
383 * c-aux-info.c: Likewise.
384 * c-convert.c: Likewise.
385 * c-decl.c: Likewise.
386 * c-errors.c: Likewise.
387 * c-lang.c: Likewise.
388 * c-objc-common.c: Likewise.
389 * c-parser.c: Likewise.
390 * c-typeck.c: Likewise.
391
da2e71c9
MLI
3922015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
393
394 PR fortran/66605
395 * c-decl.c (finish_function): Call do_warn_unused_parameter.
396
b155cfd9
MP
3972015-06-29 Marek Polacek <polacek@redhat.com>
398
399 PR c/66322
400 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
401 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
402 about -Wswitch-bool here.
403 (do_case): Update c_add_case_label call.
404 (c_finish_case): Update c_do_switch_warnings call.
405
31521951
MP
4062015-06-27 Marek Polacek <polacek@redhat.com>
407
408 * c-typeck.c: Use VECTOR_TYPE_P throughout.
409
22d03525
MP
4102015-06-26 Marek Polacek <polacek@redhat.com>
411
412 * c-array-notation.c (fix_builtin_array_notation_fn): Use
413 INDIRECT_REF_P.
414 * c-typeck.c (array_to_pointer_conversion): Likewise.
415 (build_unary_op): Likewise.
416 (c_finish_return): Likewise.
417
f0889939
AM
4182015-06-25 Andrew MacLeod <amacleod@redhat.com>
419
420 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
421 * c-parser.c: Likewise.
422
8d67ee55
RS
4232015-06-25 Richard Sandiford <richard.sandiford@arm.com>
424
425 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
426 instead of pointer_hash.
427 (detect_field_duplicates): Likewise.
428
0ae9bd27
MP
4292015-06-25 Marek Polacek <polacek@redhat.com>
430
431 * c-array-notation.c: Use VAR_P throughout.
432 * c-decl.c: Likewise.
433 * c-objc-common.c: Likewise.
434 * c-parser.c: Likewise.
435 * c-typeck.c: Likewise.
436
62f9079a
MP
4372015-06-25 Marek Polacek <polacek@redhat.com>
438
439 * c-decl.c: Use is_global_var throughout.
440 * c-parser.c: Likewise.
441 * c-typeck.c: Likewise.
442
abb226c9
AM
4432015-06-17 Andrew MacLeod <amacleod@redhat.com>
444
445 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
446 * c-aux-info.c: Likewise.
447 * c-convert.c: Likewise.
448 * c-decl.c: Likewise.
449 * c-errors.c: Likewise.
450 * c-lang.c: Likewise.
451 * c-objc-common.c: Likewise.
452 * c-parser.c: Likewise.
453 * c-typeck.c: Likewise.
454
8cbababc
JH
4552015-06-11 Jan Hubicka <hubicka@ucw.cz>
456
457 PR middle-end/66325
458 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
459 variants.
460
a0349665
PMR
4612015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
462
463 * c-decl.c (pop_scope): Register the main translation unit
464 through the new debug hook.
465
13fdf2e2
AM
4662015-06-08 Andrew MacLeod <amacleod@redhat.com>
467
468 * c-array-notation.c : Adjust include files.
469 * c-aux-info.c : Likewise.
470 * c-convert.c : Likewise.
471 * c-decl.c : Likewise.
472 * c-errors.c : Likewise.
473 * c-lang.c : Likewise.
474 * c-lang.h : Likewise.
475 * c-objc-common.c : Likewise.
476 * c-parser.c : Likewise.
477 * c-typeck.c : Likewise.
478
d7438551
AH
4792015-06-05 Aldy Hernandez <aldyh@redhat.com>
480
481 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
482 immediately clobber it.
483 (c_write_global_declarations_1): Remove call to
484 check_global_declaration_1.
485 (c_write_global_declarations_2): Remove.
486 (c_write_final_cleanups): Rename from c_write_global_declarations.
487 Remove call to finalize_compilation_unit.
488 Remove calls to debugging hooks.
489 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
490 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
491 * c-tree.h: Remove c_write_global_declarations.
492
ecb9f223
AM
4932015-06-04 Andrew MacLeod <amacleod@redhat.com>
494
495 * c-array-notation.c: Adjust includes for restructured coretypes.h.
496 * c-aux-info.c: Likewise.
497 * c-convert.c: Likewise.
498 * c-decl.c: Likewise.
499 * c-errors.c: Likewise.
500 * c-lang.c: Likewise.
501 * c-objc-common.c: Likewise.
502 * c-parser.c: Likewise.
503 * c-typeck.c: Likewise.
504
9482b620
MP
5052015-06-04 Marek Polacek <polacek@redhat.com>
506
507 PR c/66341
508 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
509 it is a lvalue.
510
bc51ace3
PK
5112015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
512
513 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
514 Warn for empty struct.
515 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
516
ea5b45b6
AT
5172015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
518
519 * c-decl.c (start_function): Call plugin before parsing.
520 (finish_function): Call plugin after parsing.
521
c2d47482
PK
5222015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
523
524 PR c/49551
525 * c-decl.c (merge_decls): Merge DECL_COMMON.
526
a95492ab
JW
5272015-05-22 Jim Wilson <jim.wilson@linaro.org>
528
529 * Make-lang.in (check_gcc_pallelize): Define.
530
fd5c817a
MP
5312015-05-22 Marek Polacek <polacek@redhat.com>
532
533 PR c/47043
534 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
535 attributes.
536
c7b70a3c
MP
5372015-05-21 Marek Polacek <polacek@redhat.com>
538
539 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
540 DECL_BUILT_IN.
541
21b634ae
MP
5422015-05-20 Marek Polacek <polacek@redhat.com>
543
544 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
545 * c-typeck.c: Likewise.
546
296a8c2f
MP
5472015-05-19 Marek Polacek <polacek@redhat.com>
548
549 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
550
41b37d5e
JJ
5512015-05-19 Jakub Jelinek <jakub@redhat.com>
552
553 PR middle-end/66199
554 * c-parser.c (c_parser_omp_for_loop): Don't add
555 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
556 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
557 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
558 constructs.
559
fab27f52
MM
5602015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
561
562 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 563 swaps.
fab27f52 564
40de31cf
MLI
5652015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
566
567 PR fortran/44054
568 * c-objc-common.c (c_tree_printer): Replace locus pointer with
569 accessor function.
570
3aa3c9fc
MP
5712015-05-14 Marek Polacek <polacek@redhat.com>
572
573 PR c/66066
574 PR c/66127
575 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
576 rather than with 0.
577
c3388e62
DM
5782015-05-12 David Malcolm <dmalcolm@redhat.com>
579
580 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
581 to add a call to warn_for_misleading_indentation.
582 (c_parser_else_body): Likewise, adding param "else_loc".
583 (c_parser_if_statement): Check for misleading indentation.
584 (c_parser_while_statement): Likewise.
585 (c_parser_for_statement): Likewise.
586
755e528f
MP
5872015-05-08 Marek Polacek <polacek@redhat.com>
588
589 PR c/64918
590 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
591 (output_init_element): Likewise.
592
0173bd2a
MP
5932015-05-07 Marek Polacek <polacek@redhat.com>
594
595 PR c/65179
596 * c-typeck.c (build_binary_op): Warn when left shifting a negative
597 value.
598
9babc352
MP
5992015-04-30 Marek Polacek <polacek@redhat.com>
600
601 * c-typeck.c (set_init_label): Call error_at instead of error and
602 pass LOC to it.
603
ac9f18db
MP
604 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
605 the type of a decl.
606
ec3fba51
MP
607 * c-typeck.c (c_build_va_arg): Clarify the error message.
608
b811915d
TS
6092015-04-29 Thomas Schwinge <thomas@codesourcery.com>
610
611 * c-parser.c (c_parser_oacc_enter_exit_data): Use
612 OMP_STANDALONE_CLAUSES.
613
f3075008
MP
6142015-04-28 Marek Polacek <polacek@redhat.com>
615
616 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
617
4e81b788
MP
6182015-04-28 Marek Polacek <polacek@redhat.com>
619
620 PR c/65901
621 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
622
6c1db78e
MP
6232015-04-25 Marek Polacek <polacek@redhat.com>
624
625 PR c/52085
626 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
627 attribute.
628
5c4abbb8
MP
6292015-04-23 Marek Polacek <polacek@redhat.com>
630
631 PR c/65345
632 * c-decl.c (set_labels_context_r): New function.
633 (store_parm_decls): Call it via walk_tree_without_duplicates.
634 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
635 instead of create_tmp_var. Build TARGET_EXPR instead of
636 COMPOUND_EXPR.
637 (build_atomic_assign): Use create_tmp_var_raw instead of
638 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
639
06aca1d5
IV
6402015-04-20 Ilya Verbin <ilya.verbin@intel.com>
641
642 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
643 (c_parser_omp_target_update): Add missed %> to error_at ().
644
8fba1830
BRF
6452015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
646
647 PR target/55143
648 * c-decl.c (c_default_pointer_mode): Remove definition.
649 * c-tree.h (c_default_pointer_mode): Remove declaration.
650
62021f64
TB
6512015-03-27 Tobias Burnus <burnus@net-b.de>
652
653 PR c/65586
654 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
655 error out.
656 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
657 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
658 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
659
9b65e171
JJ
6602015-03-19 Jakub Jelinek <jakub@redhat.com>
661
662 * c-decl.c (c_decl_attributes): Also add "omp declare target"
663 attribute for DECL_EXTERNAL VAR_DECLs.
664
17958621
JJ
6652015-03-11 Jakub Jelinek <jakub@redhat.com>
666
667 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
668 argument.
669
7ccb1a11
JJ
6702015-03-10 Jakub Jelinek <jakub@redhat.com>
671
672 PR c/65120
673 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
674 before preparing arguments to warn_logical_not_parentheses.
675
01177669
JJ
6762015-03-09 Jakub Jelinek <jakub@redhat.com>
677
678 PR c/65120
679 * c-typeck.c (parser_build_binary_op): Don't warn for
680 !!x == y or !b == y where b is _Bool.
681
802ac282
MP
6822015-03-09 Marek Polacek <polacek@redhat.com>
683
684 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
685 * c-decl.c (grokdeclarator): Likewise.
686 * c-typeck.c (build_binary_op): Likewise.
687
e5165b60
MP
6882015-02-27 Marek Polacek <polacek@redhat.com>
689
690 PR c/65228
691 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
692
065d214c
MP
6932015-02-14 Marek Polacek <polacek@redhat.com>
694
695 PR c/64768
696 * c-decl.c (grokdeclarator): Set the range of a flexible array member
697 declared through a typedef name.
698
e5d9235b
MP
6992015-02-13 Marek Polacek <polacek@redhat.com>
700
701 PR c/65050
702 * c-decl.c (grokdeclarator): Print also the type when giving
703 the error message about array's incomplete element type.
704
fa01ffcc
JJ
7052015-02-11 Jakub Jelinek <jakub@redhat.com>
706
707 PR c/64824
708 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
709 check in the POP macro.
710
c3e38a03
MP
7112015-02-09 Marek Polacek <polacek@redhat.com>
712
713 PR c/64856
714 * c-typeck.c (process_init_element): Don't always wrap
715 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
716 initializing a range of elements.
717
4886ec8e
JJ
7182015-02-04 Jakub Jelinek <jakub@redhat.com>
719
720 PR c/64824
721 PR c/64868
722 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
723
c3e38a03 7242015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
725
726 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
727 processing enum declaration.
728
7b33f0c8
MP
7292015-01-29 Marek Polacek <polacek@redhat.com>
730
731 PR c/64709
732 * c-typeck.c (pop_init_level): If constructor_elements has
733 exactly one element with integer_zerop value, set constructor_zeroinit
734 to 1. Remove braces around warning_init call.
735
dea63e49
JJ
7362015-01-27 Jakub Jelinek <jakub@redhat.com>
737
738 PR c/64766
739 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
740 of FUNCTION_DECLs with error_mark_node.
741
d38f7dce
JJ
7422015-01-26 Jakub Jelinek <jakub@redhat.com>
743
744 PR c/64778
745 * c-typeck.c (convert_arguments): Return -1 if there are
746 error_args, even if we've diagnosed too many arguments.
747
cbf5d0e7
RB
7482015-01-21 Richard Biener <rguenther@suse.de>
749
750 PR middle-end/64313
751 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
752 for builtins the user declared correctly.
753
41dbbb37
TS
7542015-01-15 Thomas Schwinge <thomas@codesourcery.com>
755 Bernd Schmidt <bernds@codesourcery.com>
756 Cesar Philippidis <cesar@codesourcery.com>
757 James Norris <jnorris@codesourcery.com>
758 Jakub Jelinek <jakub@redhat.com>
759 Ilmir Usmanov <i.usmanov@samsung.com>
760
761 * c-parser.c: Include "gomp-constants.h".
762 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
763 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
764 Use OMP_CLAUSE_SET_MAP_KIND.
765 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
766 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
767 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
768 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
769 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
770 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
771 "copyout", "create", "delete", "deviceptr", "gang", "host",
772 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
773 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
774 "present_or_create", "pcreate", "seq", "self", "vector",
775 "vector_length", "wait", "worker".
776 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
777 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
778 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
779 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
780 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
781 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
782 (c_parser_oacc_data_clause_deviceptr)
783 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
784 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
785 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
786 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
787 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
788 (c_parser_oacc_parallel, c_parser_oacc_update)
789 (c_parser_oacc_wait): New functions.
790 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
791 (c_finish_oacc_data): New prototypes.
792 * c-typeck.c: Include "gomp-constants.h".
793 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
794 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
795 OMP_CLAUSE_SET_MAP_KIND.
796 (c_finish_oacc_parallel, c_finish_oacc_kernels)
797 (c_finish_oacc_data): New functions.
798 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
799 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
800 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
801 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
802 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
803 GOMP_MAP_FORCE_DEVICEPTR.
804
adfac8df
JJ
8052015-01-09 Michael Collison <michael.collison@linaro.org>
806
807 * c-array-notation.c: Include hash-set.h, machmode.h,
808 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
809 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
810 * c-aux-info.c: Ditto.
811 * c-convert.c: Ditto.
812 * c-decl.c: Ditto.
813 * c-errors.c: Ditto.
814 * c-lang.c: Dittoxs.
815 * c-objc-common.c: Ditto.
816 * c-parser.c: Ditto.
817 * c-typeck.c: Include hash-set.h, machmode.h,
818 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
819 fold-const.h, wide-int.h, inchash.h, real.h and
820 fixed-value.h due to flattening of tree.h.
821
2cc901dc
MP
8222015-01-07 Marek Polacek <polacek@redhat.com>
823
824 PR c/64417
825 * c-typeck.c (process_init_element): Disallow initialization of
826 a flexible array member with a string constant if the structure
827 is in an array.
828
5624e564
JJ
8292015-01-05 Jakub Jelinek <jakub@redhat.com>
830
e5341100
JJ
831 PR sanitizer/64344
832 * c-typeck.c (convert_for_assignment, c_finish_return): For
833 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
834 types also set in_late_binary_op around convert call.
835 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
836 to integral type casts, if not in_late_binary_op, pass c_fully_fold
837 result on expr as last argument to ubsan_instrument_float_cast,
838 if in_late_binary_op, don't use c_save_expr but save_expr.
839
5624e564
JJ
840 Update copyright years.
841
5bd012f8
MP
8422015-01-05 Marek Polacek <polacek@redhat.com>
843
844 PR c/64423
845 * c-typeck.c (build_array_ref): Pass loc down to
846 warn_array_subscript_with_type_char.
847
768952be
MU
8482014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
849
850 * c-typeck.c: New behavious for pointers to arrays with qualifiers
851 (common-pointer-type): For pointers to arrays take qualifiers from
852 element type.
853 (build_conditional_expr): Add warnings for lost qualifiers.
854 (comp-target-types): Allow pointers to arrays with different qualifiers.
855 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
856 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
857 to PEDWARN_FOR_QUALIFIERS.
858
8f94a8c4
JJ
8592014-12-17 Jakub Jelinek <jakub@redhat.com>
860
861 PR sanitizer/64289
862 * c-convert.c: Include ubsan.h.
863 (convert): For real -> integral casts and
864 -fsanitize=float-cast-overflow don't call convert_to_integer, but
865 instead instrument the float cast directly.
866
b731b390
JJ
8672014-11-29 Jakub Jelinek <jakub@redhat.com>
868
869 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
870 c_finish_stmt_expr): Remove NULL last argument from
871 create_tmp_var_raw and create_tmp_var calls.
872 * c-array-notation.c (fix_builtin_array_notation_fn,
873 build_array_notation_expr, fix_conditional_array_notations_1,
874 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
875
541e35a6
MP
8762014-11-28 Marek Polacek <polacek@redhat.com>
877
878 PR c/63862
879 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
880 convert the right operand to integer type.
881
b286be94
MP
8822014-11-25 Marek Polacek <polacek@redhat.com>
883
884 PR c/63877
885 * c-decl.c (start_function): Disable -Wmissing-declarations warning
886 for inline functions.
887
aa7da51a
JJ
8882014-11-21 Jakub Jelinek <jakub@redhat.com>
889
890 PR target/63764
891 * c-typeck.c (build_array_ref): Adjust
892 convert_vector_to_pointer_for_subscript caller. If it returns true,
893 call non_lvalue_loc on the result.
894
d876207f
RB
8952014-11-11 Richard Biener <rguenther@suse.de>
896
897 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
898 to true.
899
e5e44252
AK
9002014-11-10 Andi Kleen <ak@linux.intel.com>
901
902 PR c/60804
903 * c-parser.c (c_parser_statement_after_labels): Call
904 check_no_cilk.
905 (c_parser_if_statement): Dito.
906 (c_parser_switch_statement): Dito.
907 (c_parser_while_statement): Dito.
908 (c_parser_do_statement): Dito.
909 (c_parser_for_statement): Dito.
910 * c-typeck.c (c_finish_loop): Dito.
911
13c21655
PC
9122014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
913
914 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
915 OPT_Wshift_count_overflow in the warnings.
916
2d51fcef
MP
9172014-10-30 Marek Polacek <polacek@redhat.com>
918
919 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
920 print the stripped version as well, if they're not the same.
921
ef4bddc2
RS
9222014-10-29 Richard Sandiford <richard.sandiford@arm.com>
923
924 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
925 machine_mode.
926
c582198b
AM
9272014-10-28 Andrew MacLeod <amacleod@redhat.com>
928
929 * c-decl.c: Adjust include files.
930 * c-parser.c: Ditto.
931
ddc8de03
PM
9322014-10-27 Phil Muldoon <pmuldoon@redhat.com>
933 Tom Tromey <tromey@redhat.com>
934
935 * c-tree.h (enum c_oracle_request): New.
936 (c_binding_oracle_function): New typedef.
937 (c_binding_oracle, c_pushtag, c_bind): Declare.
938 * c-decl.c (c_binding_oracle): New global.
939 (I_SYMBOL_CHECKED): New macro.
940 (i_symbol_binding): New function.
941 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
942 (I_TAG_CHECKED): New macro.
943 (i_tag_binding): New function.
944 (I_TAG_BINDING, I_TAG_DECL): Redefine.
945 (I_LABEL_CHECKED): New macro.
946 (i_label_binding): New function.
947 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
948 (c_print_identifier): Save and restore c_binding_oracle.
949 (c_pushtag, c_bind): New functions.
950
60393bbc
AM
9512014-10-27 Andrew MacLeod <amacleod@redhat.com>
952
953 * c-typeck.c: Adjust include files.
954
d723bb7c
MLI
9552014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
956
957 PR c++/53061
958 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
959 initialization here...
960 (c_initialize_diagnostics): ... but here. Set defaults after
961 building pretty-printer.
962
1bc5a451
MP
9632014-10-23 Marek Polacek <polacek@redhat.com>
964
965 PR c/63626
966 * c-decl.c (pop_scope): Don't print warning in external_scope.
967
4435bb92
MP
9682014-10-19 Marek Polacek <polacek@redhat.com>
969
970 PR c/63567
971 * c-typeck.c (output_init_element): Allow initializing objects with
972 static storage duration with compound literals even in C99 and add
973 pedwarn for it.
974
7278465e
MP
9752014-10-17 Marek Polacek <polacek@redhat.com>
976
977 PR c/63567
978 * c-typeck.c (digest_init): Allow initializing objects with static
979 storage duration with compound literals even in C99 and add pedwarn
980 for it.
981
d9b7be2e
MP
9822014-10-17 Marek Polacek <polacek@redhat.com>
983
984 PR c/63543
985 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
986 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
987 error multiple times. Print the type.
988
f406ae1f
MP
9892014-10-17 Marek Polacek <polacek@redhat.com>
990
991 PR c/63549
992 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
993 type.
994
92574c7c
MP
9952014-10-17 Marek Polacek <polacek@redhat.com>
996
997 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
998 (start_function): Use OPT_Wimplicit_int instead of 0.
999 (store_parm_decls_oldstyle): Likewise.
1000
1bc4a978
MT
10012014-10-17 Alan Modra <amodra@gmail.com>
1002
1003 PR middle-end/61848
1004 * c-decl.c (merge_decls): Don't merge section name or tls model
1005 to newdecl symtab node, instead merge to olddecl. Override
1006 existing olddecl section name. Set tls_model for all thread-local
1007 vars, not just OMP thread-private ones. Remove incorrect comment.
1008
83685514
AM
10092014-10-16 Andrew MacLeod <amacleod@redhat.com>
1010
1011 * c-decl.c: Adjust include files.
1012
78a7c317
DD
10132014-10-14 DJ Delorie <dj@redhat.com>
1014
1015 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1016 (c_token_starts_typename): Check all __intN, not just __int128.
1017 (c_token_starts_declspecs): Likewise.
1018 (c_parser_declspecs): Likewise.
1019 (c_parser_attribute_any_word): Likewise.
1020 (c_parser_objc_selector): Likewise.
1021 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1022 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1023 is specified.
1024 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1025 __int128.
1026 (finish_declspecs): Likewise.
1027
74d98c1e
AB
10282014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1029
1030 * c-parser.c (c_parser_all_labels): New function to replace
1031 the duplicate code.
1032 (c_parser_statement): Call the new function.
1033
84937de2
MP
10342014-10-09 Marek Polacek <polacek@redhat.com>
1035
1036 PR c/63480
1037 * c-typeck.c (pop_init_level): Don't warn about initializing
1038 with { }.
1039
0382aaa0
MP
10402014-10-07 Marek Polacek <polacek@redhat.com>
1041
1042 PR c/59717
1043 * c-decl.c (header_for_builtin_fn): New function.
1044 (implicitly_declare): Suggest which header to include.
1045
7a0ca710
MP
10462014-10-07 Marek Polacek <polacek@redhat.com>
1047
1048 * c-convert.c (convert): Use error_operand_p.
1049 * c-typeck.c (require_complete_type): Likewise.
1050 (really_atomic_lvalue): Likewise.
1051 (digest_init): Likewise.
1052 (handle_omp_array_sections_1): Likewise.
1053
6bc8a126
MP
10542014-10-03 Marek Polacek <polacek@redhat.com>
1055
1056 PR c/63453
1057 * c-decl.c (pop_scope): Don't warn about "inline function declared
1058 but never defined" for functions marked with gnu_inline attribute.
1059
d90c0a59
JJ
10602014-09-25 Jakub Jelinek <jakub@redhat.com>
1061
1062 PR c++/63249
1063 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1064 on low_bound and length.
1065
083e891e
MP
10662014-09-24 Marek Polacek <polacek@redhat.com>
1067
1068 PR c/61405
1069 PR c/53874
1070 * c-parser.c: Don't define CPP_KEYWORD.
1071 (c_parser_switch_statement): Pass original type to c_finish_case.
1072 * c-tree.h (c_finish_case): Update declaration.
1073 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1074 conditionally to c_do_switch_warnings.
1075
8d95fe25
MP
10762014-09-03 Marek Polacek <polacek@redhat.com>
1077
1078 PR c/62024
1079 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1080 conversions.
1081
9a771876
JJ
10822014-09-02 Jakub Jelinek <jakub@redhat.com>
1083 Balaji V. Iyer <balaji.v.iyer@intel.com>
1084 Igor Zamyatin <igor.zamyatin@intel.com>
1085
1086 * c-parser.c (c_parser_cilk_for): New function.
1087 (c_parser_cilk_grainsize): Likewise.
1088 (c_get_temp_regvar): Likewise.
1089 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1090 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1091 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1092 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1093 case.
1094
b7679d96
CG
10952014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1096
1097 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1098 with using HOST_WIDE_INT without truncation to 'int'
1099
59ea0364
MP
11002014-08-22 Marek Polacek <polacek@redhat.com>
1101
1102 PR c++/62199
1103 * c-typeck.c (parser_build_binary_op): Adjust call to
1104 warn_logical_not_parentheses.
1105
671a475e
IZ
11062014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1107
1108 PR other/62008
1109 * c-parser.c (c_parser_array_notation): Check for correct
1110 type of an array added.
1111
04159acf
MP
11122014-08-19 Marek Polacek <polacek@redhat.com>
1113
1114 PR c++/62153
1115 * c-typeck.c (build_binary_op): If either operand of a comparison
1116 is a boolean expression, call maybe_warn_bool_compare.
1117
c77935ee
PP
11182014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1119
1120 PR c/45584
1121 * c-typeck.c (build_c_cast): Do a conversion even when the
1122 TYPE_MAIN_VARIANTs are the same.
1123
35aff4fb
MP
11242014-08-19 Marek Polacek <polacek@redhat.com>
1125
1126 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1127 pedwarn_c99 instead of pedwarn.
1128 (grokfield): Likewise.
1129 (warn_defaults_to): New function.
1130 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1131 Unconditionally call pedwarn_c99 instead of pedwarn.
1132 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1133 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1134 check flag_isoc11 before.
1135 * c-errors.c (pedwarn_c99): Change the return type to bool.
1136 Handle -Wc99-c11-compat.
1137 * c-parser.c (disable_extension_diagnostics): Handle
1138 warn_c99_c11_compat.
1139 (restore_extension_diagnostics): Likewise.
1140 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1141 instead of pedwarn, don't check flag_isoc11 before.
1142 (c_parser_declspecs): Likewise.
1143 (c_parser_alignas_specifier): Likewise.
1144 (c_parser_alignof_expression): Likewise.
1145 (c_parser_generic_selection): Likewise.
1146 * c-tree.h (pedwarn_c99): Update declaration.
1147 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1148 of pedwarn_c99.
1149
177cce46
MP
11502014-08-19 Marek Polacek <polacek@redhat.com>
1151
1152 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1153 to pedwarn_c90.
1154 * c-errors.c: Include "opts.h".
1155 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1156 * c-parser.c (disable_extension_diagnostics): Handle negative value
1157 of warn_c90_c99_compat, too.
1158 (restore_extension_diagnostics): Likewise.
1159 (c_parser_compound_statement_nostart): Pass
1160 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1161
6dc99c33
MP
11622014-08-12 Marek Polacek <polacek@redhat.com>
1163
1164 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1165 Add pedwarn.
1166 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1167 Likewise.
1168 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1169
f3bede71
MP
11702014-08-10 Marek Polacek <polacek@redhat.com>
1171
1172 PR c/51849
1173 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1174 Call pedwarn_c90 instead of pedwarn.
1175 (check_bitfield_type_and_width): Likewise.
1176 (declspecs_add_qual): Likewise.
1177 (declspecs_add_type): Likewise.
1178 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1179 Adjust to only call pedwarn_c90.
1180 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1181 pedwarn_c90 instead of pedwarn.
1182 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1183 * c-parser.c (disable_extension_diagnostics): Handle
1184 warn_c90_c99_compat.
1185 (restore_extension_diagnostics): Likewise.
1186 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1187 pedwarn_c90 instead of pedwarn.
1188 (c_parser_initelt): Likewise.
1189 (c_parser_postfix_expression): Likewise.
1190 (c_parser_postfix_expression_after_paren_type): Likewise.
1191 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1192 * c-tree.h: Fix formatting.
1193 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1194 pedwarn_c90 instead of pedwarn.
1195
9f25a338
TS
11962014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1197
1198 * c-typeck.c: Remove include of pointer-set.h.
1199
044331a8
MP
12002014-08-07 Marek Polacek <polacek@redhat.com>
1201
1202 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1203
b787e7a2
TS
12042014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1205
1206 * c-typeck.c: Use hash_map instead of pointer_map.
1207
6e2830c3
TS
12082014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1209
1210 * c-decl.c: Use hash_set instead of pointer_set.
1211
a7ee52fb
IZ
12122014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1213
1214 PR middle-end/61455
1215 * c-array-notation.c (expand_array_notations): Handling
1216 of DECL_EXPR added.
1217
b4dfdc11
MG
12182014-07-31 Marc Glisse <marc.glisse@inria.fr>
1219
1220 PR c++/60517
1221 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1222 a local variable.
1223
976d5a22
TT
12242014-07-30 Tom Tromey <tromey@redhat.com>
1225
1226 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1227 field.
1228 (really_start_incremental_init, push_init_level): Initialize
1229 designator_depth.
1230 (pop_init_level): Set global designator_depth.
1231 (process_init_element): Check for designated_init attribute.
1232
30281de2
MP
12332014-07-20 Marek Polacek <polacek@redhat.com>
1234
1235 PR c/61852
1236 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1237 (implicitly_declare): Pass location to implicit_decl_warning.
1238
b108f48f
JJ
12392014-07-14 Jakub Jelinek <jakub@redhat.com>
1240
1241 PR middle-end/61294
1242 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1243 If non-NULL, call c_parser_check_literal_zero.
1244 (c_parser_check_literal_zero): New function.
1245 (c_parser_postfix_expression_after_primary): Adjust
1246 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1247
773ec47f
MP
12482014-07-06 Marek Polacek <polacek@redhat.com>
1249
1250 PR c/6940
1251 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1252 * c-tree.h (C_ARRAY_PARAMETER): Define.
1253 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1254 function parameter.
1255
22e1cf1c
JH
12562014-07-02 Jan Hubicka <hubicka@ucw.cz>
1257 Chen Gang <gang.chen.5i5j@gmail.com>
1258
1259 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1260 releasing symbol.
1261
52ec0ea3
MP
12622014-07-01 Marek Polacek <polacek@redhat.com>
1263
1264 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1265 instead of 0 to WARN_FOR_ASSIGNMENT.
1266
d5c3d343
MP
12672014-07-01 Marek Polacek <polacek@redhat.com>
1268
1269 PR c/58286
1270 * c-typeck.c (convert_for_assignment): Pass
1271 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1272
6a7253a4
MP
12732014-06-30 Marek Polacek <polacek@redhat.com>
1274
1275 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1276 has no_sanitize_undefined attribute.
1277
5e88a8f4
IZ
12782014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1279
1280 PR middle-end/57541
1281 * c-array-notation.c (fix_builtin_array_notation_fn):
1282 Check for 0 arguments in builtin call. Check that bultin argument is
1283 correct.
1284 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1285 index.
1286
9698b078
SH
12872014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1288
1289 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1290 qualifiers in __auto_type for atomic types.
1291 (c_parser_typeof_specifier): Discard all type qualifiers in
1292 __typeof__ for atomic types.
1293
6e07c515
MP
12942014-06-25 Marek Polacek <polacek@redhat.com>
1295
1296 PR c/61162
1297 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1298 the return expression to c_finish_return.
1299
da6f124d
JJ
13002014-06-25 Jakub Jelinek <jakub@redhat.com>
1301
1302 * c-typeck.c (c_finish_omp_clauses): Make sure
1303 OMP_CLAUSE_LINEAR_STEP has correct type.
1304
c203e8a7
TS
13052014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1306
1307 * c-decl.c: Adjust.
1308
56ad0e38
JJ
13092014-06-24 Jakub Jelinek <jakub@redhat.com>
1310
1311 * c-parser.c (c_parser_omp_for_loop): For
1312 #pragma omp parallel for simd move lastprivate clause from parallel
1313 to for rather than simd.
1314
47c2554f
MP
13152014-06-23 Marek Polacek <polacek@redhat.com>
1316
1317 * c-typeck.c (parser_build_binary_op): Don't call
1318 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1319
56363ffd
JH
13202014-06-15 Jan Hubicka <hubicka@ucw.cz>
1321
1322 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1323 * c-decl.c (merge_decls): Likewise.
1324
d7ff7ae5
MP
13252014-06-09 Marek Polacek <polacek@redhat.com>
1326
1327 PR c/36446
1328 * c-typeck.c (error_init): Call inform instead of error_at.
1329 (pedwarn_init): Call inform instead of pedwarn.
1330 (warning_init): Call inform instead of warning_at.
1331
24d047a3
JH
13322014-06-07 Jan Hubicka <hubicka@ucw.cz>
1333
1334 * c-decl.c (merge_decls): Use set_decl_section_name.
1335 (duplicate_decls): Remove node if it exists.
1336
9bac5cbb
G
13372014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1338
1339 PR c/53119
1340 * c-typeck.c (push_init_level, process_init_element,
1341 pop_init_level): Correct check for zero initialization, move
1342 missing brace warning to respect zero initialization.
1343
8ffcdea8
MP
13442014-06-05 Marek Polacek <polacek@redhat.com>
1345
1346 PR c/56724
1347 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1348
742938c9
MP
13492014-06-05 Marek Polacek <polacek@redhat.com>
1350
1351 PR c/49706
1352 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1353 on the left hand side operand of a comparison.
1354
6447c55d
MP
13552014-06-05 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/48062
1358 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1359 Print note only if the warning was printed.
1360
9dc7743c
IZ
13612014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1362
1363 PR c/58942
1364 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1365 with a pointer.
1366
fedfecef
MP
13672014-06-03 Marek Polacek <polacek@redhat.com>
1368
1369 PR c/60439
1370 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1371 c_start_case.
1372 * c-tree.h (c_start_case): Update.
1373 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1374 switch condition has boolean value.
1375
9b2b7279
AM
13762014-06-02 Andrew MacLeod <amacleod@redhat.com>
1377
1378 * c-decl.c: Include builtins.h.
1379 * c-parser.c: Likewise.
1380
5c1bc275
MP
13812014-05-27 Marek Polacek <polacek@redhat.com>
1382
1383 PR c/56724
1384 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1385 error and warning calls to error_at and warning_at. Pass location of
1386 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1387 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1388 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1389
97563bc8
IZ
13902014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1391
1392 PR c/61191
1393 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1394 function parameters.
1395
aede2c10
JH
13962014-05-23 Jan Hubicka <hubicka@ucw.cz>
1397
1398 * c-decl.c (merge_decls): Preserve symtab node pointers.
1399 (duplicate_decls): Free new decl.
1400
edbba2ce
TS
14012014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1402
f3316c6d
TS
1403 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1404 initialization.
1405
edbba2ce
TS
1406 * c-parser.c (c_parser_omp_target): Return bool values.
1407
68c81f24
TS
14082014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1409
1410 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1411 num_teams_loc variable to num_thread_limit_loc.
1412
632f2871
RS
14132014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1414
1415 * c-array-notation.c (expand_array_notations): Use void_node
1416 instead of void_zero_node.
1417
766090c2
TS
14182014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1419
1420 * c-decl.c (finish_struct): Adjust.
1421 (finish_enum): Likewise.
1422 (bind): Adjust.
1423 (record_inline_static): Likewise.
1424 (push_scope): Likewise.
1425 (make_label): Likewise.
1426 (lookup_label_for_goto): Likewise.
1427 (finish_struct): Likewise.
1428 (finish_enum): Likewise.
1429 (store_parm_decls): Likewise.
1430 (c_push_function_context): Likewise.
1431 * c-lang.h: Remove usage of variable_size gty attribute.
1432 * c-parser.c (c_parse_init): Adjust.
1433 (c_parse_file): Likewise.
1434
2b107f6b
MP
14352014-05-13 Marek Polacek <polacek@redhat.com>
1436
1437 PR c/61162
1438 * c-typeck.c (convert_for_assignment): Pass location to
1439 WARN_FOR_ASSIGNMENT instead of input_location.
1440
d033409e
MP
14412014-05-10 Marek Polacek <polacek@redhat.com>
1442
1443 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1444 maybe_warn_string_init.
1445 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1446 maybe_warn_string_init.
1447 * c-tree.h (maybe_warn_string_init): Update declaration.
1448 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1449 Call pedwarn_init with loc instead of with input_location.
1450 (digest_init): Pass init_loc to maybe_warn_string_init.
1451 (pop_init_level): Call pedwarn_init with loc instead of with
1452 input_location.
1453 (set_init_index): Likewise.
1454 (process_init_element): Likewise.
1455
ea58ef42
MP
14562014-05-09 Marek Polacek <polacek@redhat.com>
1457
1458 PR c/61096
1459 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1460 (c_parser_initelt): Pass location to set_init_label. Pass array index
1461 location to set_init_index.
1462 * c-tree.h (push_init_level): Update declaration.
1463 (pop_init_level): Likewise.
1464 (set_init_index): Likewise.
1465 (set_init_label): Likewise.
1466 * c-typeck.c (error_init): Add location parameter. Call error_at
1467 instead of error.
1468 (digest_init): Pass init_loc to error_init.
1469 (really_start_incremental_init):
1470 (push_init_level): Add location parameter. Pass loc to pop_init_level
1471 and error_init.
1472 (pop_init_level): Likewise.
1473 (set_designator): Add location parameter. Pass loc to pop_init_level,
1474 push_init_level, and error_init.
1475 (set_init_index): Add location parameter. Pass loc to error_init and
1476 set_designator.
1477 (set_init_label): Likewise.
1478 (output_init_element): Pass loc to error_init.
1479 (process_init_element): Pass loc to error_init, pop_init_level,
1480 pedwarn_init, and push_init_level.
1481
661a0813
MP
14822014-05-09 Marek Polacek <polacek@redhat.com>
1483
1484 PR c/50459
1485 * c-parser.c (c_parser_attributes): Parse the arguments as an
1486 expression-list if the attribute takes identifier.
1487
2793eeab
MP
14882014-05-08 Marek Polacek <polacek@redhat.com>
1489
1490 PR c/61053
1491 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1492 TYPE_ALIGN_UNIT.
1493
f827930a
MP
14942014-05-08 Marek Polacek <polacek@redhat.com>
1495
1496 PR c/61077
1497 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1498 of main.
1499
1d60af08
KZ
15002014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1501 Mike Stump <mikestump@comcast.net>
1502 Richard Sandiford <rdsandiford@googlemail.com>
1503
1504 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1505 (finish_enum): Use wide-int interfaces.
1506 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1507 * c-typeck.c (build_c_cast): Likewise.
1508 (set_nonincremental_init_from_string): Likewise.
1509 (c_tree_equal): Likewise.
1510
a0e24419
MP
15112014-05-02 Marek Polacek <polacek@redhat.com>
1512
1513 PR c/25801
1514 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1515 Return size_one_node when the type is not complete.
1516 (pointer_diff): Remove comment.
1517 (build_unary_op): Improve error messages.
1518
19fc9faa
MP
15192014-05-02 Marek Polacek <polacek@redhat.com>
1520
1521 * c-typeck.c (c_finish_return): Separate warning_at calls.
1522
63bc4e87
MP
15232014-05-02 Marek Polacek <polacek@redhat.com>
1524
1525 * c-tree.h (error_init): Remove declaration.
1526 (pedwarn_init): Likewise.
1527 * c-typeck.c (error_init): Make static and move above.
1528 (pedwarn_init): Likewise.
1529 (warning_init): Move above.
1530 (maybe_warn_string_init): Likewise.
1531
4bd2511b
JL
15322014-05-01 Jeff Law <law@redhat.com>
1533
1534 Revert:
1535
1536 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1537 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1538 avoid goto.
1539
6a358dcb
MP
15402014-05-02 Marek Polacek <polacek@redhat.com>
1541
1542 PR c/60784
1543 * c-typeck.c (push_init_level): Set constructor_designated to
1544 p->designated for structures.
1545
ae5ebda4
MP
15462014-05-01 Marek Polacek <polacek@redhat.com>
1547
1548 PR c/60915
1549 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1550 function-definition has an attribute after the declarator.
1551
96b40f8d
MP
15522014-05-01 Marek Polacek <polacek@redhat.com>
1553
1554 PR c/60257
1555 * c-typeck.c (warning_init): Add location_t parameter. Call
1556 warning_at instead of warning.
1557 (push_init_level): Pass input_location to warning_init.
1558 (add_pending_init): Add location_t parameter. Pass loc to
1559 warning_init.
1560 (set_nonincremental_init): Pass input_location to add_pending_init.
1561 (set_nonincremental_init_from_string): Likewise.
1562 (output_init_element): Pass loc to warning_init and to
1563 add_pending_init.
1564
32e00768
MP
15652014-05-01 Marek Polacek <polacek@redhat.com>
1566
1567 PR c/43395
1568 * c-typeck.c (c_finish_return): Distinguish between label and variable
1569 when warning about returning local address.
1570
c9379ce2
MP
15712014-05-01 Marek Polacek <polacek@redhat.com>
1572
1573 PR c/29467
1574 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1575 in C89 mode.
1576
d00887e8
MP
15772014-05-01 Marek Polacek <polacek@redhat.com>
1578
1579 PR c/43245
1580 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1581 instead of 0 to WARN_FOR_QUALIFIERS.
1582
5436fa2e
MP
15832014-05-01 Marek Polacek <polacek@redhat.com>
1584
1585 PR c/56989
1586 * c-typeck.c (default_conversion): Use better location for
1587 error call.
1588
f8ed5150
MP
15892014-04-30 Marek Polacek <polacek@redhat.com>
1590
1591 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1592 also when SANITIZE_FLOAT_DIVIDE is on.
1593
8337d1db
MP
15942014-04-30 Marek Polacek <polacek@redhat.com>
1595
1596 PR c/60139
1597 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1598 and pedwarn_init. Use loc insted of input_location.
1599
c4bdc42f
MP
16002014-04-30 Marek Polacek <polacek@redhat.com>
1601
1602 PR c/60351
1603 * c-typeck.c (build_binary_op): Use location when warning about
1604 shift count.
1605
45484dcf
MP
16062014-04-25 Marek Polacek <polacek@redhat.com>
1607
1608 PR c/18079
1609 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1610 always_inline/noinline and hot/cold attributes.
1611
34cf811f
MP
16122014-04-25 Marek Polacek <polacek@redhat.com>
1613
1614 PR c/60114
1615 * c-parser.c (c_parser_initelt): Pass input_location to
1616 process_init_element.
1617 (c_parser_initval): Pass loc to process_init_element.
1618 * c-tree.h (process_init_element): Adjust declaration.
1619 * c-typeck.c (push_init_level): Pass input_location to
1620 process_init_element.
1621 (pop_init_level): Likewise.
1622 (set_designator): Likewise.
1623 (output_init_element): Add location_t parameter. Pass loc to
1624 digest_init.
1625 (output_pending_init_elements): Pass input_location to
1626 output_init_element.
1627 (process_init_element): Add location_t parameter. Pass loc to
1628 output_init_element.
1629
42056eac
JJ
16302014-04-24 Jakub Jelinek <jakub@redhat.com>
1631
1632 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1633 atomic-clause, allow comma in between atomic-clause and
1634 seq_cst.
1635
e162a134
JJ
16362014-04-22 Jakub Jelinek <jakub@redhat.com>
1637
1638 PR c/59073
1639 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1640 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1641
2f6babac
IZ
16422014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1643
1644 PR middle-end/60469
1645 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1646 create_tmp_var instead build_decl for creating temps.
1647 (build_array_notation_expr): Likewise.
1648 (fix_conditional_array_notations_1): Likewise.
1649 (fix_array_notation_expr): Likewise.
1650 (fix_array_notation_call_expr): Likewise.
1651
8edbfaa6
JJ
16522014-03-28 Jakub Jelinek <jakub@redhat.com>
1653
1654 PR c++/60689
1655 * c-tree.h (c_build_function_call_vec): New prototype.
1656 * c-typeck.c (build_function_call_vec): Don't call
1657 resolve_overloaded_builtin here.
1658 (c_build_function_call_vec): New wrapper function around
1659 build_function_call_vec. Call resolve_overloaded_builtin here.
1660 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1661 Call c_build_function_call_vec instead of build_function_call_vec.
1662 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1663 * c-decl.c (finish_decl): Likewise.
1664
7485aeea
MLI
16652014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1666
1667 PR c/55383
1668 * c-typeck.c: Use correct format string in cast-qual warning
1669
b17a8b07
TS
16702014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1671
1672 * c-decl.c (c_decl_attributes): Use
1673 lang_hooks.types.omp_mappable_type.
1674 * c-typeck.c (c_finish_omp_clauses): Likewise.
1675
3af9c5e9
MP
16762014-03-06 Marek Polacek <polacek@redhat.com>
1677
1678 PR c/60197
1679 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1680 of checking tree code.
1681
1c9f5f33
PK
16822014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1683
1684 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1685 (c_parser_parameter_declaration): Likewise.
1686
cc28fc7f
MP
16872014-02-19 Marek Polacek <polacek@redhat.com>
1688
1689 PR c/60195
1690 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1691 Call mark_exp_read on exp.value.
1692 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1693 TREE_ADDRESSABLE on old instead of val.
1694 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1695
b581c05c
PK
16962014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1697
1698 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1699 C_EXPR_APPEND by vec_safe_push.
1700 * c-tree.h (C_EXPR_APPEND): Remove.
1701
81e5eca8
MP
17022014-01-31 Marek Polacek <polacek@redhat.com>
1703
1704 PR c/59963
1705 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1706 build_function_call_vec.
1707 (build_function_call): Likewise.
1708 (build_atomic_assign): Likewise.
1709 (build_function_call_vec): Add arg_loc parameter. Use it.
1710 (convert_arguments): Likewise.
1711 (convert_for_assignment): Rename rhs_loc to expr_loc.
1712 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1713 (c_parser_objc_keywordexpr): Likewise.
1714 (c_parser_postfix_expression_after_primary): Call
1715 build_function_call_vec with expr_loc rather than op_loc.
1716 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1717 build_function_call_vec.
1718 (c_parser_expr_list): Add locations parameter. Fill it with locations
1719 of function arguments.
1720 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1721
68fca595
MP
17222014-01-30 Marek Polacek <polacek@redhat.com>
1723
1724 PR c/59940
1725 * c-typeck.c (build_function_call_vec): Use loc parameter.
1726 (convert_arguments): Add location parameter. Use it.
1727 (ep_convert_and_check): Likewise.
1728 (build_atomic_assign): Adjust convert_for_assignment call.
1729 (build_modify_expr): Likewise.
1730 (digest_init): Likewise.
1731 (c_finish_return): Likewise.
1732 (build_conditional_expr): Adjust ep_convert_and_check calls.
1733 (convert_for_assignment): Add rhs_loc parameter. Use it.
1734 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1735 calls.
1736
fa337f3a
RB
17372014-01-30 Richard Biener <rguenther@suse.de>
1738
1739 PR c/59905
1740 * c-typeck.c (build_function_call_vec): Do not replace calls
1741 to a function via an incompatible type with a runtime abort.
1742
b72271b9
BI
17432014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1744
1745 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1746 flag_enable_cilkplus with flag_cilkplus.
1747 (c_parser_direct_declarator_inner): Likewise.
1748 (c_parser_attribute_any_word): Likewise.
1749 (c_parser_attributes): Likewise.
1750 (c_parser_compound_statement): Likewise.
1751 (c_parser_statement_after_labels): Likewise.
1752 (c_parser_if_statement): Likewise.
1753 (c_parser_switch_statement): Likewise.
1754 (c_parser_do_statement): Likewise.
1755 (c_parser_for_statement): Likewise.
1756 (c_parser_unary_expression): Likewise.
1757 (c_parser_postfix_expression): Likewise.
1758 (c_parser_postfix_expression_after_primary): Likewise.
1759 (c_parser_postfix_expression_after_primary): Likewise.
1760 (c_parser_omp_clause_name): Likewise.
1761 (c_finish_omp_declare_simd): Likewise.
1762 (c_parser_cilk_verify_simd): Likewise.
1763 * c-typeck.c (build_array_ref): Likewise.
1764 (build_function_call_vec): Likewise.
1765 (convert_arguments): Likewise.
1766 (build_compound_expr): Likewise.
1767 (c_finish_return): Likewise.
1768 (c_finish_if_stmt): Likewise.
1769 (c_finish_loop): Likewise.
1770 (build_binary_op): Likewise.
1771
393e8e8b
MP
17722014-01-23 Marek Polacek <polacek@redhat.com>
1773
1774 PR c/59846
1775 * c-typeck.c (parser_build_binary_op): Use location instead of
1776 input_location.
1777 (build_binary_op): Pass location to shorten_compare.
1778
f04dda30
MP
17792014-01-23 Marek Polacek <polacek@redhat.com>
1780
1781 PR c/58346
1782 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1783 an empty aggregate.
1784
789eadcd
MP
17852014-01-23 Marek Polacek <polacek@redhat.com>
1786
1787 PR c/59871
1788 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1789 of a comma expression.
1790 (emit_side_effect_warnings): Likewise.
1791
40f14e9f
BI
17922014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1793
1794 PR c/59825
1795 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1796 function to use walk_tree and moved a lot of its functionality to
1797 expand_array_notations.
1798 (expand_array_notations): New function.
1799
74558dd9
BI
18002014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1801
1802 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1803 attribute an attribute without value.
1804
652fea39
JJ
18052014-01-23 Jakub Jelinek <jakub@redhat.com>
1806
1807 PR middle-end/58809
1808 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1809 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1810
f34f1c87
MP
18112014-01-22 Marek Polacek <polacek@redhat.com>
1812
1813 PR c/59891
1814 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1815 of remove_c_maybe_const_expr on op1 and op2.
1816
241f845a
JJ
18172014-01-15 Jakub Jelinek <jakub@redhat.com>
1818
1819 PR c/58943
1820 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1821 effects, preevaluate rhs using SAVE_EXPR first.
1822
9a74f20c
BI
18232014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1824
1825 PR c++/59631
1826 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1827 statements with if-elseif statements.
1828
96066ce1
MP
18292014-01-06 Marek Polacek <polacek@redhat.com>
1830
1831 PR c/57773
1832 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1833 defined bit-field types only in ISO C.
1834
23a5b65a
RS
18352014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1836
1837 Update copyright years
1838
f9030485
RS
18392014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1840
1841 * c-array-notation.c: Use the standard form for the copyright notice.
1842
41958c28
BI
18432013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1844
1845 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1846 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1847 field in parser is not empty. If not-empty, call the function
1848 c_parser_finish_omp_declare_simd.
1849 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1850 between SIMD-enabled functions and #pragma simd. Added new parameter.
1851 (c_parser_cilk_all_clauses): Modified the usage of the function
1852 c_parser_cilk_clause_vectorlength as mentioned above.
1853 (c_parser_cilk_simd_fn_vector_attrs): New function.
1854 (c_finish_cilk_simd_fn_tokens): Likewise.
1855 (is_cilkplus_vector_p): Likewise.
1856 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1857 "nomask," and "mask" strings in clause name.
1858 (c_parser_omp_all_clauses): Added 3 new case statements:
1859 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1860 PRAGMA_CILK_CLAUSE_NOMASK.
1861 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1862 check for vector attribute and if so call the function
1863 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1864 called the function c_finish_cilk_simd_fn_tokens.
1865 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1866 parser field is non-empty. If so, parse them as you would parse
1867 the omp declare simd pragma.
1868 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1869 Added a check when step is a parameter and flag it as error.
1870 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1871 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1872 pragma_omp_clause.
1873
cef0fd0e
TS
18742013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1875
1876 * c-parser.c (c_parser_omp_parallel): Fix description.
1877
12893402
BI
18782013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1879
1880 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1881 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1882 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1883 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1884
296674db
JM
18852013-12-04 Joseph Myers <joseph@codesourcery.com>
1886
1887 PR c/52023
1888 * c-parser.c (c_parser_alignas_specifier): Use
1889 c_sizeof_or_alignof_type instead of c_alignof.
1890 (c_parser_alignof_expression): Likewise, with min_alignof
1891 parameter depending on alignof spelling used.
1892
edd28054
MP
18932013-12-04 Marek Polacek <polacek@redhat.com>
1894
1895 PR c/54113
1896 * c-decl.c (start_function): Don't warn for missing prototype for
1897 inline functions.
1898
da0fc454
MP
18992013-12-03 Marek Polacek <polacek@redhat.com>
1900
1901 PR c/59351
1902 * c-decl.c (build_compound_literal): Allow compound literals with
1903 empty initial value.
1904
4c2ecab0
JM
19052013-12-02 Joseph Myers <joseph@codesourcery.com>
1906
1907 PR c/58235
1908 * c-typeck.c (build_modify_expr): Diagnose assignment to
1909 expression with array type.
1910
340baef7
JM
19112013-11-29 Joseph Myers <joseph@codesourcery.com>
1912
1913 PR c/42262
1914 * c-typeck.c (process_init_element): Do not treat a string as
1915 initializing a whole array when used with a designator for an
1916 individual element.
1917
6763b9f7
JM
19182013-11-29 Joseph Myers <joseph@codesourcery.com>
1919
1920 PR c/57574
1921 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1922 an inline function following a static declaration.
1923
e7bd1de1
JJ
19242013-11-28 Jakub Jelinek <jakub@redhat.com>
1925
1926 PR c/59310
1927 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1928 to p_name before calling c_parser_omp_teams instead of after.
1929 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1930 argument. Remove unused p_name variable.
1931
0136f8f0
AH
19322013-11-27 Aldy Hernandez <aldyh@redhat.com>
1933 Jakub Jelinek <jakub@redhat.com>
1934
1935 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1936 external_scope is NULL.
1937
241b71bb
TV
19382013-11-27 Tom de Vries <tom@codesourcery.com>
1939 Marc Glisse <marc.glisse@inria.fr>
1940
1941 PR c++/59032
1942 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1943
2fb9a547
AM
19442013-11-22 Andrew MacLeod <amacleod@redhat.com>
1945
1946 * c-typeck.c: Add required include files from gimple.h.
1947
8400e75e
DM
19482013-11-22 David Malcolm <dmalcolm@redhat.com>
1949
1950 * c-decl.c (define_label, shadow_tag_warned)
1951 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1952 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1953 (declspecs_add_type): Remove use of in_system_header macro.
1954 * c-parser.c (c_parser_unary_expression): Likewise.
1955 * c-typeck.c (store_init_value, process_init_element)
1956 (c_start_case): Likewise.
1957
1958 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1959 macro.
1960
1961 * c-parser.c (c_parser_set_source_position_from_token): Remove
1962 reference to in_system_header from comment.
1963
386b1f1f
RS
19642013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1965
1966 * c-decl.c (grokdeclarator): Update comment to refer to
1967 tree_to_[su]hwi rather than tree_low_cst.
1968
ae7e9ddd
RS
19692013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1970
1971 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1972 tree_to_uhwi throughout.
1973
9439e9a1
RS
19742013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1975
1976 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1977 throughout.
1978
9541ffee
RS
19792013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1980
1981 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1982 throughout.
1983
c02065fc
AH
19842013-11-15 Aldy Hernandez <aldyh@redhat.com>
1985
1986 * c-parser.c (c_parser_cilk_simd): New.
1987 (c_parser_cilk_verify_simd): New.
1988 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1989 (c_parser_omp_for_loop): Add case for NE_EXPR.
1990 Set c_break_label for CILK_SIMD.
1991 (c_parser_cilk_clause_vectorlength): New.
1992 (c_parser_cilk_clause_linear): New.
1993 (c_parser_cilk_clause_name): New.
1994 (c_parser_cilk_all_clauses): New.
1995 * c-typeck.c (build_unary_op): Pass location argument to
1996 readonly_error.
1997 (build_modify_expr): Same.
1998 (build_asm_expr): Same.
1999 (c_finish_bc_stmt): Error on break/continue in loops.
2000
18f429e2
AM
20012013-11-14 Andrew MacLeod <amacleod@redhat.com>
2002
2003 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2004
d8a2d370
DN
20052013-11-14 Diego Novillo <dnovillo@google.com>
2006
2007 * c-decl.c: Include print-tree.h.
2008 Include stor-layout.h.
2009 Include varasm.h.
2010 Include attribs.h.
2011 Include stringpool.h.
2012 * c-lang.c: Include fold-const.h.
2013 * c-parser.c: Include stringpool.h.
2014 Include attribs.h.
2015 Include stor-layout.h.
2016 Include varasm.h.
2017 Include trans-mem.h.
2018 * c-typeck.c: Include stor-layout.h.
2019 Include trans-mem.h.
2020 Include varasm.h.
2021 Include stmt.h.
2022
38b7bc7f
JM
20232013-11-13 Joseph Myers <joseph@codesourcery.com>
2024
2025 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2026 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2027 __auto_type.
2028 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2029 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2030 RID_AUTO_TYPE.
2031 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2032 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2033 (c_parser_declarator, c_parser_direct_declarator_inner)
2034 (c_parser_parameter_declaration, c_parser_type_name): All callers
2035 changed.
2036 (c_parser_declaration_or_fndef): Handle declarations with type
2037 determined from the initializer.
2038
45b0be94
AM
20392013-11-12 Andrew MacLeod <amacleod@redhat.com>
2040
18f429e2 2041 * c-typeck.c: Include gimplify.h.
45b0be94 2042
582d9b50
JM
20432013-11-12 Joseph Myers <joseph@codesourcery.com>
2044
2045 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2046 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2047 comment.
2048 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2049 or _Thread_local as appropriate in diagnostics.
2050 (build_null_declspecs): Initialize ret->thread_gnu_p.
2051 (declspecs_add_scspec): Handle either __thread or _Thread_local
2052 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2053 pedantic. Do not disallow _Thread_local extern and _Thread_local
2054 static.
2055
267bac10
JM
20562013-11-07 Joseph Myers <joseph@codesourcery.com>
2057 Andrew MacLeod <amacleod@redhat.com>
2058
2059 * c-aux-info.c (gen_type): Handle atomic qualifier.
2060 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2061 qualifiers when compating types.
2062 (shadow_tag_warned): Handle atomic_p in declspecs.
2063 (quals_from_declspecs): Likewise.
2064 (start_decl): Use c_type_promotes_to when promoting argument
2065 types.
2066 (grokdeclarator): Handle _Atomic.
2067 (get_parm_info): Diagnose any qualifier on "void" as only
2068 parameter.
2069 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2070 comparing types. Use c_type_promotes_to when promoting argument
2071 types.
2072 (finish_function): Use c_type_promotes_to when promoting argument
2073 types.
2074 (build_null_declspecs): Handle atomic_p in declspecs.
2075 (declspecs_add_qual): Handle RID_ATOMIC.
2076 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2077 (c_token_starts_declspecs): Handle RID_ATOMIC.
2078 (c_parser_declspecs): Handle atomic type specifiers and
2079 qualifiers.
2080 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2081 from types of expressions with atomic type.
2082 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2083 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2084 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2085 (c_parser_statement_after_labels, c_parser_switch_statement)
2086 (c_parser_for_statement, c_parser_expr_no_commas)
2087 (c_parser_conditional_expression, c_parser_binary_expression)
2088 (c_parser_cast_expression, c_parser_unary_expression)
2089 (c_parser_postfix_expression)
2090 (c_parser_postfix_expression_after_primary, c_parser_expression):
2091 Use convert_lvalue_to_rvalue.
2092 (c_parser_expression_conv, c_parser_expr_list): Document
2093 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2094 (c_parser_objc_synchronized_statement): Use
2095 convert_lvalue_to_rvalue.
2096 (c_parser_objc_selector): Handle RID_ATOMIC.
2097 (c_parser_objc_receiver, c_parser_array_notation): Use
2098 convert_lvalue_to_rvalue.
2099 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2100 _Atomic (type-name).
2101 (struct c_declspecs): Add atomic_p field.
2102 (convert_lvalue_to_rvalue): Declare.
2103 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2104 corresponding atomic types.
2105 (qualify_type): Don't add _Atomic qualifiers from second argument.
2106 (comp_target_types): Do not allow _Atomic mismatches.
2107 (type_lists_compatible_p): Do not remove atomic qualifiers when
2108 comparing types.
2109 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2110 (build_atomic_assign): New functions.
2111 (build_unary_op): Use build_atomic_assign for atomic increment and
2112 decrement.
2113 (build_conditional_expr): Do not treat _Atomic void as a qualified
2114 version of void.
2115 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2116 (find_anonymous_field_with_type, convert_to_anonymous_field)
2117 (convert_for_assignment): Do not remove atomic qualifiers when
2118 comparing types.
2119 (digest_init): Do not accept initialization of arrays of atomic
2120 elements by string constants.
2121 (build_asm_expr): Use convert_lvalue_to_rvalue.
2122 (build_binary_op): Do not treat _Atomic void as a qualified
2123 version of void.
2124
0c249d4b
DD
21252013-11-06 DJ Delorie <dj@redhat.com>
2126
2127 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2128 both explicit and builtin, print the location of the explicit one.
2129
6d7f7e0a
TB
21302013-11-05 Tobias Burnus <burnus@net-b.de>
2131
2132 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2133 c_parser_omp_distribute, c_parser_omp_teams,
2134 c_parser_omp_target, c_parser_omp_declare): Handle
2135 -fopenmp-simd.
2136
b906f4ca
MP
21372013-11-03 Marek Polacek <polacek@redhat.com>
2138
2139 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2140
ee1d5a02
JJ
21412013-11-01 Jakub Jelinek <jakub@redhat.com>
2142
2143 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2144 check_dup_generic at the end, unless remove is true.
2145 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2146 remove = true;.
2147 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2148
5a9785fb
JJ
21492013-10-31 Jakub Jelinek <jakub@redhat.com>
2150
2151 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2152 with decl that is not pointer nor array.
2153
939b37da
BI
21542013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2155
2156 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2157 a spawning function is found.
2158 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2159 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2160 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2161 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2162 case.
2163 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2164 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2165 expr.
2166 (c_finish_return): Added a check to reject _Cilk_spawn in return
2167 expression.
2168 (build_cilk_spawn): New function.
2169 (build_cilk_sync): Likewise.
2170 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2171
d4af74d4
TB
21722013-10-27 Tobias Burnus <burnus@net-b.de>
2173
2174 PR other/33426
2175 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2176 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2177 (c_parser_statement_after_labels): Update calls.
2178
d73749df 21792013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2180
2181 PR other/33426
2182 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2183 Handle PRAGMA_IVDEP.
2184 (c_parser_statement_after_labels): Update call.
2185
f28aa681
MP
21862013-10-24 Marek Polacek <polacek@redhat.com>
2187
2188 * c-parser.c (c_parser_struct_declaration): Add a comment.
2189 (c_parser_declarator): Don't allow _Alignas here.
2190
0645c1a2
AM
21912013-10-17 Andrew MacLeod <amacleod@redhat.com>
2192
2193 * c-parser.c: Include omp-low.h.
2194 * c-typeck.c: Likewise.
2195
568a31f2
MP
21962013-10-17 Marek Polacek <polacek@redhat.com>
2197
2198 PR c/58267
2199 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2200 Document syntax of the array-declarator.
2201 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2202 are not permitted.
2203 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2204 (c_parser_struct_declaration): Likewise.
2205 (c_parser_declarator): Likewise.
2206 (c_parser_direct_declarator_inner): Likewise.
2207 (c_parser_parameter_declaration): Likewise.
2208 (c_parser_type_name): Likewise.
2209
acf0174b
JJ
22102013-10-11 Jakub Jelinek <jakub@redhat.com>
2211
2212 * c-lang.h (current_omp_declare_target_attribute): New extern
2213 decl.
2214 * c-parser.c: Include c-lang.h.
2215 (struct c_parser): Change tokens to c_token *.
2216 Add tokens_buf field. Change tokens_avail type to unsigned int.
2217 (c_parser_consume_token): If parser->tokens isn't
2218 &parser->tokens_buf[0], increment parser->tokens.
2219 (c_parser_consume_pragma): Likewise.
2220 (enum pragma_context): Add pragma_struct and pragma_param.
2221 (c_parser_external_declaration): Adjust
2222 c_parser_declaration_or_fndef caller.
2223 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2224 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2225 Adjust recursive call.
2226 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2227 of pragma_external.
2228 (c_parser_parameter_declaration): Use pragma_param instead of
2229 pragma_external.
2230 (c_parser_compound_statement_nostart, c_parser_label,
2231 c_parser_for_statement): Adjust
2232 c_parser_declaration_or_fndef callers.
2233 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2234 it through to c_parser_conditional_expression.
2235 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2236 pass it through to c_parser_binary_expression. Adjust recursive
2237 call.
2238 (c_parser_binary_expression): Remove prec argument, add
2239 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2240 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2241 binop matches it, use build2 instead of parser_build_binary_op.
2242 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2243 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2244 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2245 Handle pragma_struct and pragma_param the same as pragma_external.
2246 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2247 (c_parser_omp_variable_list): Parse array sections for
2248 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2249 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2250 (c_parser_omp_clause_reduction): Handle user defined reductions.
2251 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2252 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2253 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2254 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2255 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2256 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2257 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2258 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2259 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2260 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2261 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2262 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2263 (c_parser_omp_for_loop): Add CODE argument, pass it through
2264 to c_finish_omp_for. Change last argument to cclauses,
2265 and adjust uses to grab parallel clauses from the array of all
2266 the split clauses. Adjust c_parser_binary_expression,
2267 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2268 (omp_split_clauses): New function.
2269 (c_parser_omp_simd): New function.
2270 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2271 Allow the function to be called also when parsing combined constructs,
2272 and call c_parser_omp_simd when parsing for simd.
2273 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2274 #pragma omp section, require exactly one structured-block instead of
2275 sequence of statements.
2276 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2277 Allow the function to be called also when parsing combined constructs.
2278 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2279 Allow the function to be called also when parsing combined
2280 constructs.
2281 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2282 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2283 c_parser_omp_teams, c_parser_omp_target_data,
2284 c_parser_omp_target_update, c_parser_omp_target,
2285 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2286 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2287 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2288 (c_parser_omp_construct): Add p_name and mask vars. Handle
2289 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2290 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2291 and c_parser_omp_sections callers.
2292 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2293 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2294 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2295 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2296 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2297 OMP_CLAUSE_DEPEND.
2298 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2299 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2300 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2301 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2302 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2303 * c-typeck.c: Include tree-inline.h.
2304 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2305 handle_omp_array_sections_1, handle_omp_array_sections,
2306 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2307 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2308 user defined reductions.
2309 (c_tree_equal): New function.
2310 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2311 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2312 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2313 c_check_omp_declare_reduction_r): New prototypes.
2314 * c-decl.c (current_omp_declare_target_attribute): New variable.
2315 (c_decl_attributes): New function.
2316 (start_decl, start_function): Use it instead of decl_attributes.
2317 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2318 c_omp_reduction_decl, c_omp_reduction_lookup,
2319 c_check_omp_declare_reduction_r): New functions.
2320
0a6c2227
TT
23212013-09-25 Tom Tromey <tromey@redhat.com>
2322
2323 * Make-lang.in (c/gccspec.o): Remove.
2324 (CFLAGS-c/gccspec.o): New variable.
2325 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2326 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2327 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2328
f3bc55f0
TT
23292013-09-25 Tom Tromey <tromey@redhat.com>
2330
2331 * Make-lang.in (c/gccspec.o): Don't use subshell.
2332
a24d975c
MP
23332013-09-18 Marek Polacek <polacek@redhat.com>
2334
2335 PR sanitize/58443
2336 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2337 Remove unnecessary check.
2338
ce6923c5
MP
23392013-09-18 Marek Polacek <polacek@redhat.com>
2340
2341 PR sanitizer/58411
2342 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2343 no_sanitize_undefined attribute.
2344
a1e51df9
KT
23452013-09-13 Kai Tietz <ktietz@redhat.com>
2346
2347 PR target/57848
2348 * c-decl.c (c_builtin_function_ext_scope): Remove
2349 wrong assumption that it is never called on prexisting
2350 symbol.
2351
0af94e6f
JR
23522013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2353
2354 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2355
20059c8b
GDR
23562013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2357
2358 * c-objc-common.c (c_tree_printer): Tidy.
2359
de5a5fa1
MP
23602013-08-30 Marek Polacek <polacek@redhat.com>
2361
2362 * c-typeck.c (build_binary_op): Add division by zero and shift
2363 instrumentation.
2364
2531a1d9 23652013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2366 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2367
6e2bcc98 2368 PR c/35649
2531a1d9
JR
2369 * c-typeck.c (c_common_type): Prefer double_type_node over
2370 other REAL_TYPE types with the same precision.
2371 (convert_arguments): Likewise.
2372
025311c4
GDR
23732013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2374
2375 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2376 (c_initialize_diagnostics): Call a destructor for the early printer.
2377
da6ca2b5
GDR
23782013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2379
2380 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2381 printer initialization.
2382
318cda85 23832013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2384
318cda85
BI
2385 PR c/57490
2386 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2387 check for truth values.
2388 (expand_array_notation_exprs): Added truth values case. Removed an
2389 unwanted else. Added for-loop to walk through subtrees in default
2390 case.
2391
b066401f
GDR
23922013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2393
2394 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2395
fb48aadc
JM
23962013-07-23 Joseph Myers <joseph@codesourcery.com>
2397
2398 * c-parser.c (struct c_generic_association): Fix typo.
2399
433cc7b0
TT
24002013-07-23 Tom Tromey <tromey@redhat.com>
2401 Joseph Myers <joseph@codesourcery.com>
2402
2403 * c-parser.c (struct c_generic_association): New.
2404 (c_generic_association_d): New typedef.
2405 (c_parser_generic_selection): New function.
2406 (c_parser_postfix_expression): Handle RID_GENERIC.
2407
26d40c3d
JM
24082013-07-13 Jason Merrill <jason@redhat.com>
2409
2410 PR c++/57793
2411 * c-decl.c (finish_struct): Check for too-large class.
2412
ecdbd01a 24132013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2414
2415 PR c/57821
2416 * c-typeck.c (set_init_index): When folding, check for index overflow.
2417
1141ed3f
BI
24182013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2419
2420 * c-parser.c (c_parser_array_notation): Removed rejection of array
2421 notations in an array of function pointers.
2422
713b46fa
BI
24232013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2424
2425 * c-array-notation.c (make_triplet_val_inv): New function.
2426 (create_cmp_incr): Likewise.
2427 (create_array_refs): Likewise.
2428 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2429 Also modularized common parts between functions and called the function.
2430 (build_array_notation_expr): Likewise.
2431 (fix_conditional_array_notations_1): Likewise.
2432 (fix_array_notation_expr): Likewise.
2433 (fix_array_notation_call_expr): Likewise.
2434
92f20202
MP
24352013-06-18 Marek Polacek <polacek@redhat.com>
2436
2437 PR c/57630
2438 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2439
73a23b06
BI
24402013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2441
2442 * c-array-notation.c (build_array_notation_expr): Reject array notation
2443 mismatch between LHS and RHS even inside a call_expr. Also, removed
2444 a couple while statements that were dead code.
2445
00b8517d
BI
24462013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2447
2448 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2449 excessive precision expressions in function parameters. Also removed
2450 couple unwanted while statements.
2451
1509bdda
BI
24522013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2453
2454 * c-array-notation.c (expand_array_notation_exprs): Added
2455 ARRAY_NOTATION_REF case.
2456
d60f1706
BI
24572013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2458
2459 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2460 function to c-family/array-notation-common.c.
2461 (is_cilkplus_reduce_builtin): Likewise.
2462 (find_rank): Likewise.
2463 (extract_array_notation_exprs): Likewise.
2464 (replace_array_notations): Likewise.
2465 (find_inv_trees): Likewise.
2466 (replace_inv_trees): Likewise.
2467 (contains_array_notation_expr): Likewise.
2468 (find_correct_array_notation_type): Likewise.
2469 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2470 (struct inv_list): Moved this to c-family/array-notation-common.c.
2471 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2472
6d6efbb3
BI
24732013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2474
2475 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2476 reduction functions outside the for-loop. Added a check if the fundecl
2477 is non-NULL. Finally, removed an unwanted if-statement, and made the
2478 body unconditional.
2479
25c22937
BI
24802013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2481
2482 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2483 condition of the if-statement matches the rank of else-block and then-
2484 block when array notations are used.
2485 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2486 expression after the entire function body is parsed.
2487 (c_parser_expr_no_commas): Delayed creating array notation expressions
2488 to the end of function parsing.
2489 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2490 whole if-statement instead of just the condition.
2491 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2492
edd25645
BI
24932013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2494
2495 PR c/57474
2496 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2497 array to NULL_TREE if they are unused. Also added a check for the
2498 field to be NULL before its fields are used in future.
2499
065ce7f1
RO
25002013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2501
2502 PR bootstrap/57450
2503 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2504 (build_array_notation_expr): Likewise.
2505
36536d79
BI
25062013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2507
2508 * c-typeck.c (build_array_ref): Added a check to see if array's
2509 index is greater than one. If true, then emit an error.
2510 (build_function_call_vec): Exclude error reporting and checking
2511 for builtin array-notation functions.
2512 (convert_arguments): Likewise.
2513 (c_finish_return): Added a check for array notations as a return
2514 expression. If true, then emit an error.
2515 (c_finish_loop): Added a check for array notations in a loop
2516 condition. If true then emit an error.
2517 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2518 (build_binary_op): Added a check for array notation expr inside
2519 op1 and op0. If present, we call another function to find correct
2520 type.
2521 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2522 * c-parser.c (c_parser_compound_statement): Check if array
2523 notation code is used in tree, if so, then transform them into
2524 appropriate C code.
2525 (c_parser_expr_no_commas): Check if array notation is used in LHS
2526 or RHS, if so, then build array notation expression instead of
2527 regular modify.
2528 (c_parser_postfix_expression_after_primary): Added a check for
2529 colon(s) after square braces, if so then handle it like an array
2530 notation. Also, break up array notations in unary op if found.
2531 (c_parser_direct_declarator_inner): Added a check for array
2532 notation.
2533 (c_parser_compound_statement): Added a check for array notation in
2534 a stmt. If one is present, then expand array notation expr.
2535 (c_parser_if_statement): Likewise.
2536 (c_parser_switch_statement): Added a check for array notations in
2537 a switch statement's condition. If true, then output an error.
2538 (c_parser_while_statement): Similarly, but for a while.
2539 (c_parser_do_statement): Similarly, but for a do-while.
2540 (c_parser_for_statement): Similarly, but for a for-loop.
2541 (c_parser_unary_expression): Check if array notation is used in a
2542 pre-increment or pre-decrement expression. If true, then expand
2543 them.
2544 (c_parser_array_notation): New function.
2545 * c-array-notation.c: New file.
2546 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2547
cd192ccc
MS
25482013-05-23 Mike Stump <mikestump@comcast.net>
2549
2550 * c-typeck.c (convert_for_assignment): Handle references to memory
2551 spaces better.
2552
427b248d
JM
25532013-05-16 Jason Merrill <jason@redhat.com>
2554
2555 * Make-lang.in (cc1$(exeext)): Use link mutex.
2556
44d90fe1
PC
25572013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2558
2559 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2560 to simply use OPT_Wpointer_arith.
2561 (build_unary_op): Likewise.
2562
4e7d7b3d
JJ
25632013-04-03 Jakub Jelinek <jakub@redhat.com>
2564
2565 PR c/19449
2566 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2567 argument. If set, or it temporarily for parsing of the first
2568 argument into force_folding_builtin_constant_p.
2569 (c_parser_postfix_expression): Adjust callers.
2570
839b422f
RB
25712013-03-21 Richard Biener <rguenther@suse.de>
2572
2573 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2574 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2575
2ee028f1
MP
25762013-02-12 Marek Polacek <polacek@redhat.com>
2577
2578 PR c/44938
2579 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2580 origtypes to NULL.
2581
8824edff
JJ
25822013-01-24 Jakub Jelinek <jakub@redhat.com>
2583
2584 PR c/56078
2585 * c-typeck.c (set_nonincremental_init_from_string): If
2586 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2587 returned false.
2588 (process_init_element): Likewise.
2589
eadd3d0d
JJ
25902012-12-20 Jakub Jelinek <jakub@redhat.com>
2591
2592 PR c++/55619
2593 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2594 argument, don't call default_function_array_conversion
2595 nor c_fully_fold here.
2596 (c_parser_asm_statement): Adjust callers.
2597 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2598 and outputs here, and call default_function_array_conversion
2599 on inputs that don't need to be addressable.
2600
f8a93a2e
JJ
26012012-12-18 Jakub Jelinek <jakub@redhat.com>
2602
2603 PR c/39464
2604 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2605 warning require that both c_common_unsigned_type as well as
2606 c_common_signed_type is the same for both mvl and mvr types.
2607
9771b263
DN
26082012-11-16 Diego Novillo <dnovillo@google.com>
2609
2610 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2611
2612 * c-common.c: Use new vec API in vec.h.
2613 * c-common.h: Likewise.
2614 * c-gimplify.c: Likewise.
2615 * c-pragma.c: Likewise.
2616 * c-pretty-print.c: Likewise.
2617 * c-pretty-print.h: Likewise.
2618 * c-semantics.c: Likewise.
2619 * c-decl.c: Likewise.
2620 * c-parser.c: Likewise.
2621 * c-tree.h: Likewise.
2622 * c-typeck.c: Likewise.
2623
880661a4
JW
26242012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2625
2626 PR c++/54930
2627 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2628
077d1abe
MLI
26292012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2630
2631 PR c/53066
2632 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2633 shadows a function, unless the variable is a function or a
2634 pointer-to-function.
2635
3a785c97
JJ
26362012-10-12 Jakub Jelinek <jakub@redhat.com>
2637
2638 PR c/54381
2639 * c-parser.c (struct c_tree_loc_pair): Removed.
2640 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2641 add location_t * and tree * arguments, fill in array of 3
2642 sizeof_arg trees and corresponding locs.
2643 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2644 c_parser_expr_list callers.
2645 (c_parser_postfix_expression_after_primary): Likewise. Pass
2646 array of 3 sizeof_arg trees and locs (corresponding to first
2647 3 arguments) to sizeof_pointer_memaccess_warning.
2648
703c8606
LC
26492012-10-09 Lawrence Crowl <crowl@google.com>
2650
2651 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2652 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2653 hash table.
2654
5d9de0d0
PC
26552012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2656
2657 PR c++/54194
2658 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2659 call.
2660
a212e43f
MG
26612012-10-09 Marc Glisse <marc.glisse@inria.fr>
2662
2663 PR c++/54427
2664 * c-typeck.c: Include c-common.h.
2665 (enum stv_conv): Moved to c-common.h.
2666 (scalar_to_vector): Moved to c-common.c.
2667 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2668 * Make-lang.in: c-typeck.c depends on c-common.h.
2669
3b78de56
AC
26702012-10-04 Arnaud Charlet <charlet@adacore.com>
2671
2672 * c-decl.c (c_write_global_declarations): Fix handling of
2673 -fdump-ada-spec*.
2674
78c60e3d
SS
26752012-09-30 Sharad Singhai <singhai@google.com>
2676
2677 * c-decl.c (c_write_global_declarations): Use a different method
2678 to determine if the dump has ben initialized.
2679
9f33203d
JM
26802012-09-14 Joseph Myers <joseph@codesourcery.com>
2681
2682 PR c/54552
2683 * c-typeck.c (c_cast_expr): When casting to a type requiring
2684 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2685 c_fully_fold first.
2686
a27d595d
JM
26872012-09-14 Joseph Myers <joseph@codesourcery.com>
2688
2689 PR c/54103
2690 * c-typeck.c (build_unary_op): Pass original argument of
2691 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2692 any C_MAYBE_CONST_EXPR, if it has integer operands.
2693 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2694 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2695 to c_objc_common_truthvalue_conversion, then remove any
2696 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2697 c_objc_common_truthvalue_conversion not
2698 c_common_truthvalue_conversion.
2699 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2700 call note_integer_operands for arguments with integer operands
2701 that are not integer constants.
2702
9feb29df
JJ
27032012-09-13 Jakub Jelinek <jakub@redhat.com>
2704
2705 PR c/54559
2706 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2707 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2708
d409320c
JJ
27092012-08-31 Jakub Jelinek <jakub@redhat.com>
2710
2711 PR c/54428
2712 * c-convert.c (convert): Don't call fold_convert_loc if
2713 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2714 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2715 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2716
6265d07c
JJ
27172012-08-24 Jakub Jelinek <jakub@redhat.com>
2718
2719 PR c/54355
2720 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2721 for nested and empty_ok arguments in the call to
2722 c_parser_declaration_or_fndef.
2723
1a4049e7
JJ
27242012-08-17 Jakub Jelinek <jakub@redhat.com>
2725
2726 * c-tree.h (c_last_sizeof_arg): Declare.
2727 * c-parser.c (struct c_tree_loc_pair): New type.
2728 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2729 non-NULL.
2730 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2731 (c_parser_postfix_expression_after_primary): Likewise. Call
2732 sizeof_pointer_memaccess_warning if needed.
2733 (sizeof_ptr_memacc_comptypes): New function.
2734 * c-typeck.c (c_last_sizeof_arg): New global variable.
2735 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2736
0229aee9
UB
27372012-07-24 Uros Bizjak <ubizjak@gmail.com>
2738
2739 * c-lang.h (lang_decl): Add variable_size GTY option.
2740
7ee2468b
SB
27412012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2742
2743 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2744 * Make-lang.in: Fix dependencies.
2745
d4a10d0a
SB
27462012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2747
2748 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2749 and add language Makefile hooks.
2750 * config-lang.in: New file.
2751 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2752 add the required "normal" config-lang.in rules.
2753 * c-lang.h: Moved from gcc/ to here.
2754 * c-tree.h: Likewise.
2755 * c-objc-common.c: Likewise.
2756 * c-objc-common.h: Likewise.
2757 * c-typeck.c: Likewise.
2758 * c-convert.c: Likewise.
2759 * c-lang.c: Likewise.
2760 * c-aux-info.c: Likewise.
2761 * c-errors.c: Likewise.
2762 * gccspec.c: Likewise.
2763 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2764 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2765\f
5624e564 2766Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2767
2768Copying and distribution of this file, with or without modification,
2769are permitted in any medium without royalty provided the copyright
2770notice and this notice are preserved.